Linking table?-URGENT [message #20142] |
Wed, 01 May 2002 06:42 |
Sund
Messages: 6 Registered: May 2002
|
Junior Member |
|
|
Hi
I have two tables table Order - Order_num, Line_number,Item and qty.
Table JOB - Job_Number, Item, Order_Num , line_num.
An Ordered Item(Ordered_part) will have two jobs in Job table.First job will be for the item ordered itself(Job_Main) and the second for a part(Job_part) which will go into the ordered item.
Need to display the data in one row such that..
Order_Part info, Job_Main info, Job_partinfo.
If the qty demanded is one then I have no problem. But how do I handle a situation when
1.qty ordered is say more than one for eg 3
2.Job_Main is three.BUT
3.Job_Part is one.
That is when number of Job_Part is lesser than Ordered qty..
How to achieve this in SQL?
Thanks in adavnce
-Sund
|
|
|
Re: Linking table?-URGENT [message #20154 is a reply to message #20142] |
Wed, 01 May 2002 23:51 |
Bisor
Messages: 2 Registered: May 2002
|
Junior Member |
|
|
I want to help, But I couldnt understand the structure of the tables. How an order is inserted into tables?(the relation between qty and # of parts). Or, simply can you write a sample data, and the required info from tables?
|
|
|