View Single Post

   
  #2 (permalink)  
Old 02-26-2008, 06:48 AM
sybrandb
 
Posts: n/a
Default Re: Using a Select as a Var??

On Jul 5, 5:50 pm, valigula <valig...@gmail.com> wrote:
> Hi All
> Need top repeat a select 3 times but with differents where condition.
> I tried to repeat the selects and after use a couple of union to join
> then, but it takes toooo long.
>
> I also remember there was a way such as:
>
> using var (select stamment)
> select *
> from var
> where .....
>
> but i can not remember the exact syntaxes.
>
> Does anybody know?.
>
> Thanks.


'syntaxes' are looked up in the SQL reference manual, NOT by posting
here!!
and it is the WITH statement

--
Sybrand Bakker
Senior Oracle DBA

Reply With Quote