I try what you told me using the @ before the variable, but I dont think that the query is actually viewing it as one, its more like another text for the like.

For example, I try with @Residencia and :Residencia, and insert in the table those like values, and it return some matches, but for the rest of record dont get anything even when the input is something like Planet of the Apes, Im working with a Store Procedure.

To make it sort:

SET TERM ^ ;
PROCEDURE CONSULTAR_ARTISTAS_NACIONALES
(
   NOMBRE_ARTISTA Varchar(150),
    RESIDENCIA Varchar(100)

)
RETURNS
(
    NOMBRE Varchar(150),
    RESIDEN Varchar(100),
AS
BEGIN
       FOR
        SELECT NOMBRE_ARTISTA, LUGAR_RESIDENCIA
        FROM ARTISTAS_NACIONALES
       WHERE LUGAR_RESIDENCIA like '[EMAIL PROTECTED]'
        INTO :NOMBRE, :RESIDEN
        DO SUSPEND;
END^
SET TERM ; ^

On 10/27/06, Carlos Guzmán Álvarez <[EMAIL PROTECTED]> wrote:
Hello:
> Excuse me, how do I use the statement "like", Im been looking in the
> web but can't find anything.
>
> I try to do something like
> select
> from
> where [Attribute] like ' % :NAME % '
>
> Assuming that the parameter :NAME is the input value, any help here please
Try using :



select
from
where [Attribute] like ' % @NAME % '

or

select
from
where [Attribute] like ' % ? % '


--
Carlos Guzmán Álvarez
Vigo-Spain

http://carlosga.wordpress.com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider



--
"When you don't code, you tend to become one of those architects who thinks everything is possible" (Anders Hejlsberg )
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to