Board index » delphi » How to use SQL-92 in Delphi3

How to use SQL-92 in Delphi3

Dear Sir,

     I had used a statement like this:
 select * from tab1,tab2 where tab1.id = tab2.p_id and tab1.id=
(select tab3.id from tab3 where id=:par)

  This is accept in SQL6.5,but not accept in Delphi3.It report return
mult row.But I need it. I think its a SQL-92,but delphi3 not support.
The other, It not support TO_CHAR and son on.
   Who can help me and How can I do?
   Thanks!
                                         Yueqingsheng

 

Re:How to use SQL-92 in Delphi3


Use then reserved SQL word <IN> something like

select * from tab1,tab2 where tab1.id = tab2.p_id and
    in (select tab3.id from tab3 where id=:par and tab1.id = tab3.id)

or this

 select * from tab1,tab2 where in
    (select
        tab3.id
    from
        tab3
    where in
        id=:par and
        tab1.id =
        tab3.id and
        tab1.id = tab2.p_id)

I don't know if the syntax is correct but i know you can use the <IN> word.

Quote
Yue Qingsheng wrote in message <3519A505.3117E...@cqu.edu.cn>...
>Dear Sir,

>     I had used a statement like this:
> select * from tab1,tab2 where tab1.id = tab2.p_id and tab1.id=
>(select tab3.id from tab3 where id=:par)

>  This is accept in SQL6.5,but not accept in Delphi3.It report return
>mult row.But I need it. I think its a SQL-92,but delphi3 not support.
>The other, It not support TO_CHAR and son on.
>   Who can help me and How can I do?
>   Thanks!
>                                         Yueqingsheng

Other Threads