Subject Re: An SQL stored procedure problem - any help
Author stevenharrison3
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 01:40 PM 23/02/2005 +0000, you wrote:
>
> >Everything compiles fine but the execute statement does not work.
> > The error messages are:
> >
> >Invalid token.
> >Dynamic SQL Error.
> >SQL error code = -104.
> >Unexpected end of command.
> >
> >and in debug mode:
> >
> >Error Message:
> >----------------------------------------
> >SQL Parse Error:
> >
> >EOF in string detected
>
> Yup. You are using double-quotes where you need to use doubled
single
> quotes, here
>
> WHERE
> TYPICALTOPICS LIKE "%'||:s_keyword||'%" OR DESCRIPTION
> LIKE "%'||:s_keyword||'%"))';
>
> should be
>
> WHERE
> TYPICALTOPICS LIKE ''%'||:s_keyword||'%'' OR DESCRIPTION
> LIKE ''%'||:s_keyword||'%''))';
>
> (You might need to paste this into a monotext editor to see the
difference)
>
> ./hb


Thanks for that Helen.
What I get now is:

Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, char 488.
%.

and on debug mode:

Error Message:
----------------------------------------
SQL Parse Error:

EOF in string detected

Is my use of execute statement (VAR_SEARCHSTRING); a valid way to do
this?