Subject | Re: [firebird-support] An SQL stored procedure problem - any help |
---|---|
Author | Helen Borrie |
Post date | 2005-02-23T15:26:38Z |
At 01:40 PM 23/02/2005 +0000, you wrote:
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
>Everything compiles fine but the execute statement does not work.Yup. You are using double-quotes where you need to use doubled single
> 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
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