Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

create view

571889Apr 11 2007 — edited Apr 12 2007
hi


I should create a view


seleting the following data

table1
ID sal code1 code2
1 2000 a b
1 3000 z t
2 1000 a f
2 1234 r s

--here I should select each 'id' with high sal and respective code1 and code2

table2
id id1 status
1 002112 a
1 002322 i
2 23333 a
2 34344 i

--here i should select respective id1 s for ids selected from table1 whose status is 'a'

and the view should contain new columns flag1, flag2 which should have yes or no value which should be assigned by us based on the condition from other table
as

if resv='good' then flag1=yes

table3
id resv
1 good

if the ids selected are not in table 3(here id2 does not exist in table 3 ,it should not be displayed in the view)

please help me

thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2007
Added on Apr 11 2007
15 comments
590 views