Subject Re: [ib-support] Greetings, and, Fire!
Author Helen Borrie
At 06:55 PM 28-05-02 -0300, you wrote:

>In my codes, I have, sevarals poits that uses SQL expressions like this:
>'select xxx from TABLE T where :STATUSES like '%,' || T.STATUS || ',%'. In
>no long past, this code solves the problem of passing a set of values to a
>query, to be used in place of an IN clause, for example:
>
>select apptno from appointments
>where status in (:statuses);

I don't believe that could work. The IN clause needs a set at prepare time.


>This ("...where :STATUSES like '%,' || T.STATUS || ',%'...") work fine,
>but at now, I don't know wy, it stops to work.

I think you are mistaken about this, too.


>I did an upgrade of my Firebird to the version 1.0 and using it now.
>Have a local net with Linux server (lastest Red Hat equivalent).
>Access this server with Win98 clients.
>
>So, this is what a want to know:
>
>Dind't my code work any more?

I would be astonished if something like your sample above ever worked with
any SQL database. For a DSQL statement to handle parameter criteria, you
would need

select apptno from appointments
where status = :status1
or status = :status2
or status = :status3 . . .

regards
Helen

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________