![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Guys, I'm new with sybase, but I have bit of knowledge of DB2. I know that exist the "WITH" statement in DB2 to create a temporary table during the query execution. I would like to know if there is something like this in sybase. Look the sample in DB2: *with * * * temp1 as (select pub_name, max(c_price) as maxprice * * * * * * * * * * * * * *from book group bypub_name), * * * temp2 as (select *pub_name, *maxprice from temp1 * * * * * * * * * * where maxprice = (select max(maxprice) from temp1) ) * * * select case when t.maxprice = t2.maxprice *then '*' else '' END, * * * * k.pub_name, isbn, author, title, c_price * * * * from book k, temp1 t , temp2 t2 * * * * where k.pub_name = t.pub_name and * * * * * * * k.c_price = t.maxprice * * * * order by k.pub_name; Thank you |
![]() |
| Thread Tools | |
| Display Modes | |
| |