Home Forums SQL Server 2005 T-SQL (SS2K5) Select statements included within a function cannot return data to a client RE: Select statements included within a function cannot return data to a client

  • I suspect that the query is logically incorrect. Since you have declared the variable @Descricao but not assigned any value to it.

    declare @Descricao as varchar(200)

    select top 1 lt.txtDescricao

    from gpv_promocoes p

    inner join GPV_Log l

    on p.codPromocao = l.cod_objeto

    inner join GPV_Log_Tipo lt

    on lt.cod_tipolog = l.cod_tipolog

    where p.codPromocao = @codPromocao and lt.txtDescricao = @Descricao

    --Ramesh