Error with Report Parameters

1 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    12 posts
    Member since:
    Feb 2013

    Posted 18 Apr 2013 Link to this post

    Hello Guys, 

    How I can to make my query to receive a parameter using '%like%'?

    I tried this 3 options below but its dont working ( last(5ª) line )

    SELECT PSR.NOME, CO.NOME, FU.NOME, CO.ATIVO,CO.ID_PSR
    FROM COLABORADOR CO
    LEFT OUTER JOIN PSR ON PSR.ID_PSR = CO.ID_PSR
    LEFT OUTER JOIN FUNCAO FU ON FU.ID_FUNCAO = CO.ID_FUNCAO
    WHERE PSR.NOME LIKE %@Nome_PSR%

    SELECT PSR.NOME, CO.NOME, FU.NOME, CO.ATIVO,CO.ID_PSR
    FROM COLABORADOR CO
    LEFT OUTER JOIN PSR ON PSR.ID_PSR = CO.ID_PSR
    LEFT OUTER JOIN FUNCAO FU ON FU.ID_FUNCAO = CO.ID_FUNCAO
    WHERE PSR.NOME LIKE '%@Nome_PSR%'

    SELECT PSR.NOME, CO.NOME, FU.NOME, CO.ATIVO,CO.ID_PSR
    FROM COLABORADOR CO
    LEFT OUTER JOIN PSR ON PSR.ID_PSR = CO.ID_PSR
    LEFT OUTER JOIN FUNCAO FU ON FU.ID_FUNCAO = CO.ID_FUNCAO
    WHERE PSR.NOME LIKE @Nome_PSR


    Follow in attachment

Back to Top