-
Hi
Incase I want to check out the presence of two columns in a table how do I do that .
select (ordernum,date ) from table_name A where (order_num,date) in (Select (order_num,date) from table_name B.
Gives me an error
and
if I write
select (ordernum,date ) from table_name A where exists (Select (ordernum,date ) from table_name B) gives me all orders and treats order_num and date as seperate columsn .
Please help
regards
-
It looks like you have extra parenthesis in your subquery
try this instead
select (ordernum,date ) from table_name A where (order_num,date) in (Select order_num,date from table_name B)
-
Return the foll. error.
select (ordernum,date ) from table_name A where exists
*
ERROR at line 1:
ORA-00907: missing right parenthesis
-
Guys!!
I am sorry about the bracket but it is the logic that I am looking for . I want to find out the columns in a table A which are similar to two columns in table B .
Please refer to my SQL and disregard the bracket error
How do i do that
thanks
-
Try This, Hopefully shoule be fine,
Select c1, c2 From Table1 a
where exists (select c1, c2 from table2 b where a.c1=b.c1 and a.c2=b.c2)
You should be fine,
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|