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)
 Header and Details Query

Author  Topic 

jonasalbert20
Constraint Violating Yak Guru

300 Posts

Posted - 2006-09-26 : 22:42:38
I had a tblHeader and a tblDetail tables. Can anyone show me how to display all details of the tblHeader including the datas in the tblHeader eventhough it doesn't have any available details in tbldetails?



Want Philippines to become 1st World COuntry? Go for World War 3...

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-26 : 23:34:34
Use Left Join on tblHeader:

Select t1.col1, t1.col2, t2.col1, t2.col2
From TblHeader t1
Left Join
TblDetails t2
on t1.key = t2.key


Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

jonasalbert20
Constraint Violating Yak Guru

300 Posts

Posted - 2006-09-26 : 23:48:43
tnx a lot. :D

Want Philippines to become 1st World COuntry? Go for World War 3...
Go to Top of Page
   

- Advertisement -