Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 joining unrelated tables

Author  Topic 

kandy
Starting Member

15 Posts

Posted - 2006-10-04 : 15:12:02
INSERT INTO PART VALUES('DR93','Gas Range',8,'AP','2',495.00);
INSERT INTO PART VALUES('FD21','Stand Mixer',22,'HW','3',159.95);
INSERT INTO PART VALUES('KL62','Dryer',12,'AP','1',349.95);
INSERT INTO PART VALUES('KV29','Treadmill',9,'SG','2',1390.00);

INSERT INTO ORDER_LINEVALUES('21610','DR93',1,495.00);
NSERT INTO ORDER_LINE VALUES('21608','AT94',11,21.95);


customer and order_line tables have part_num as common attribute..
as u can see part_num DR93 in the above tables.But what is needed is customer_num and customer_name from the customer table which currently have an order for gas range.

INSERT INTO CUSTOMER VALUES('356','Ferguson''s','382
Wildwood','Northfield','FL','33146',5785.00,7500.00,'65');
INSERT INTO CUSTOMER VALUES('408','The Everything Shop','1828
Raven','Crystal','FL','33503',5285.25,5000.00,'35');

INSERT INTO REP VALUEs('35','Hull','Richard','532Jackson','Sheldon','FL','33553',39216.00,0.07);

rep and customer table have rep_num as the common attribute.(rep_num 35)






tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-10-04 : 15:13:20
Duplicate:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=73028

Please post your replies in the 73028 thread.

Tara Kizer
Go to Top of Page
   

- Advertisement -