|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
user71408
Joined: 17 Mar 2008 Posts: 1 Country: India |
|
sql join query |
|
Hi I have 3 tables.
|
|
Table columns
--------------------------------------------------------
1. Buy buyer,sellername
2. IM product,hdate,UOM,dept,sec,subsec
3. stud dept,sec,subsec
|
[code]
Required O/P with columns as :
--------------------------------------------
--------------------------------------------------
buyer product dept sec subsec
---------------------------------------------------
[code]
I wrote the query as follows
[code]
select b.buyer,iem.product,iem.dept,iem.class,iem.subsec
from buyer b,im iem,stud st
where iem.class=st.class and b.buyer in
(select buyer from buyer)
Error :
--------
I got for the same item i am getting different buyers..
So please resolve this issue.
I am not able to join BUYER table. Hope i am getting the error
at (select buyer from buyer)
so can you please help me in this issue.
Thank you.
|
|
Mon Mar 17, 2008 5:51 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
It looks like you got bad data in your database or your SQL query is not correct
Sorry, I am not really clear what this all has to do with SQL Assistant software?
|
|
Mon Mar 17, 2008 10:40 am |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|