This is a migrated thread and some comments may be shown as answers.

Error with Report Parameters

0 Answers 50 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 18 Apr 2013, 03:58 PM
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

No answers yet. Maybe you can help?

Tags
Report Designer (standalone)
Asked by
Ricardo
Top achievements
Rank 1
Share this question
or