09-14-2007 10:58 AM
09-14-2007 11:01 AM
Hi blalji
you can't do it for open SQL but in case of selecting directly from database (Native SQL) , you can do.
Regards
Wiboon
09-14-2007 11:01 AM
Hi,
Yes u can give. But its advisable not to do that.
It affects the performance badly.
<b><REMOVED BY MODERATOR></b>
regards,
Pritha.
Message was edited by:
Alvaro Tejada Galindo
09-14-2007 11:01 AM
09-14-2007 11:05 AM
yes you can do that this is called subquery
just check this
SELECT * FROM SFLIGHT
INTO WA
WHERE SEATSOCC = ( SELECT MAX( SEATSOCC ) FROM SFLIGHT ).
WRITE: / WA-CARRID, WA-CONNID, WA-FLDATE.
ENDSELECT.
But it is not recomended in the performance perspective.
regards
shiba dutta
09-14-2007 11:06 AM
ya balaji u can do that...
SELECT SINGLE city latitude longitude
INTO (city, lati, longi)
FROM sgeocity
WHERE city IN ( SELECT cityfrom
FROM spfli
WHERE carrid = carr_id AND
connid = conn_id ).
09-14-2007 11:23 AM
Hi Balaji,
well, you can do first, the select of the "where" clause.
Then, you put your results, in a "ranges" table.
And finally, you do the main select, with this "ranges" in the where clause.
Hope this help you!