hola declare una varible para que cuando manden la consulta desde la pagina aspx me reciba la variable y segun esomuestre los campos porque no me funciona
declare @tipo varchar
select @tipo='SUG'
select COD_SOLICITUD,RAZSOC_PROV_EMAIL,RECEPTOR_EMAIL,con vert(varchar(10), creation_date, 103) AS Recibido,
0 AS ESTADOACTUAL,
--datediff(dd,(getdate()),(creation_date)) as Dias
round (datediff(dd,(last_edit_date),(getdate())),1) as Dias
,count(*) as TOTAL
--into ##r1
from profile
where cod_solicitud like '+@tipo+%'
group by COD_SOLICITUD,RAZSOC_PROV_EMAIL,RECEPTOR_EMAIL,las t_edit_date,creation_date