Prism + Firebird + DDEX

Delphi

23/03/2012

Boa tarde!

Amigos, alguem sabe me dizer porque o select abaixo não funciona utilizando
SqlDataSource...
O problema esta no LIKE c/ o %... Se tiro o % roda, mas ai não serve...
Será que é algum problema do DDEX, unsuported...

SELECT CODPRO, NOMPRO, VENPRO, GRUPRO, CATPRO FROM DSI_PRO WHERE (NOMPRO like ? + %)

Por Favor...

Obrigado.
Junior Zanca

Junior Zanca

Curtidas 0

Respostas

Bruno Leandro

Bruno Leandro

23/03/2012

tenta desta forma

SELECT CODPRO, NOMPRO, VENPRO, GRUPRO, CATPRO FROM DSI_PRO WHERE (NOMPRO like %||valorPesquisado)
GOSTEI 0
Junior Zanca

Junior Zanca

23/03/2012

Olá!

Não deu certo não...

Nem assim: SELECT CODPRO, NOMPRO, VENPRO FROM DSI_PRO WHERE(NOMPRO LIKE % + @Param2)

Mais alguem?

Obrigado...
GOSTEI 0
Bruno Leandro

Bruno Leandro

23/03/2012

troca o + por ||
GOSTEI 0
Junior Zanca

Junior Zanca

23/03/2012

Bruno Obrigado... mas ainda não deu... veja

Tentei
SELECT CODPRO, NOMPRO, VENPRO FROM DSI_PRO WHERE (NOMPRO LIKE % || @Param2)
SELECT CODPRO, NOMPRO, VENPRO FROM DSI_PRO WHERE (NOMPRO LIKE %|| + @Param2)
SELECT CODPRO, NOMPRO, VENPRO FROM DSI_PRO WHERE (NOMPRO LIKE % + || + @Param2)
Passando por parametro não da certo...

Assim roda...
SELECT CODPRO, NOMPRO, VENPRO FROM DSI_PRO WHERE (NOMPRO LIKE %Teste)

Obrigado
GOSTEI 0
POSTAR