View previous topic :: View next topic |
Author |
Message |
chandra Beginner
Joined: 26 Sep 2003 Posts: 130 Topics: 36
|
Posted: Sat Oct 11, 2003 1:47 am Post subject: How to join more than two tabels in datacom |
|
|
Hi,
My problem is like this,
I have three tables x,y,z in Datacom. Frist I want to select a contract number from tabel x if its "status" is "active", For each row found I want search in table Y or Z by using contract number. and write there temination date.
please help me.......
Regards,
Chandra. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Oct 11, 2003 6:54 am Post subject: |
|
|
chandra,
Try this sql
Code: |
SELECT *
FROM YTABLE
WHERE CONTRACT_NO IN ( SELECT CONTRACT_NO
FROM XTABLE
WHERE STATUS=ACTIVE)
UNION
SELECT *
FROM ZTABLE
WHERE CONTRACT_NO IN ( SELECT CONTRACT_NO
FROM XTABLE
WHERE STATUS=ACTIVE)
|
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
chandra Beginner
Joined: 26 Sep 2003 Posts: 130 Topics: 36
|
Posted: Sun Oct 12, 2003 11:44 pm Post subject: |
|
|
Hi Kolusu,
This is SQl query,This will not work in DATACOM.
I need datacom query..
 _________________ Regards,
Chandra |
|
Back to top |
|
 |
|
|