Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: HELP!! SQL query

Re: HELP!! SQL query

From: Andrew Pahomov <Pahomov_at_validio.com.ua>
Date: Thu, 7 Dec 2000 10:00:57 +0200
Message-ID: <3a2f432c@miik2-ilt.ilt.kharkov.ua>

select a.*,b.*

                from (select * from tablename where competitorcode='Y') a ,
                         (select * from tablename where competitorcode='N')
b

Dan White <dwhite_at_icimail.com> wrote in message news:90m05b0tmu_at_drn.newsguy.com...
> Hello I have a problem query. PL/SQL is not an option for this problem
 because I
> have to greate a view with this querry
>
> my table desc is as follows
>
> OUTLET VARCHAR2(8)
> NAME VARCHAR2(40)
> UNITS1 NUMBER(10,2)
> UNITS2 NUMBER(10,2)
> UNITS3 NUMBER(10,2)
> UNITS4 NUMBER(10,2)
> UNITS5 NUMBER(10,2)
> COMPETITORCODE CHAR(1)
>
> What I need to produce is
> outlet,name,units1 av1,units2 av2,units3 av3,units4 av4,units5 av5,
> units1 cp1,units2 cp2,units3 cp3, units4 cp4,units5 cp5
>
> I need to see units 1-5 where competitor code = 'Y'
> and units 1- 5 where competitorcode ='N' in the same row
> is there a way to do this???
>
> Thanks in advance
> Dan White
>
> Dan White
> programmer/analyst
>
Received on Thu Dec 07 2000 - 02:00:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US