Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with a select statement
Why use DUAL...It just add a layer of complexity. Su Man's method will work fine..
JOB_CD M
------ -
000361 T
000919 T
andrewst_at_onetel.net.uk (Tony) wrote:
>l.ray_at_bigfoot.com (L.Ray) wrote in message news:<c198b469.0303302159.48f1d7dc_at_posting.google.com>...
>> I need to do the following, but dont know how:
>>
>> select (select max(status) from tickets where location = 'NY'),
>> (select max(status) from tickets where location = 'NJ')
>> FROM tickets;
>>
>> If anyone could shine some light on how to do this, it would be appreciated.
>
>You almost had it:
>
>select (select max(status) from tickets where location = 'NY'),
> (select max(status) from tickets where location = 'NJ')
>FROM DUAL; -- not FROM tickets
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- Received on Mon Mar 31 2003 - 13:36:18 CST
![]() |
![]() |