Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with a select statement
TurkBear <john.greco_at_dot.state.mn.us> wrote in message news:<os5h8v4faa3mp4s7ro4gmiim8322lhv9ds_at_4ax.com>...
> Why use DUAL...It just add a layer of complexity.
Because the original questioner apparently wanted the result in a single row:
> >> 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;
select (select max(status) from tickets where location = 'NY') NY,
(select max(status) from tickets where location = 'NJ') NJ
FROM DUAL;
NY NJ
-- --
Z Z
Yes, it's an extra layer of complexity, but if that's the result that's wanted, so be it. Received on Tue Apr 01 2003 - 04:50:22 CST
![]() |
![]() |