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.
| Author |
Topic |
|
mlawton40
Starting Member
15 Posts |
Posted - 2007-04-18 : 06:38:14
|
| Hi, I have the following 3 tables and columns:Order GroupOrdGroupDescriptionXRef_AR_OrderGroupARIdOrdGroupARARIdCustomerNameI am trying to pull from these tables the CustomerName and Description when an AR is in a Order Group (XRef_AR_OrderGroup).Any help would be great!Thanks, Mark |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-04-18 : 06:42:24
|
| select t1.description, t3.customernamefrom order_group as t1 inner join xref_ar_ordergroup as t2 on t2.ordgroup = t1.ordgroupinner join ar as t3 on t3.arid = t2.aridwhere t2.ordgroup = <somevalue> or t2.arid = <somevalue>Peter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-04-18 : 06:43:29
|
| Join OrderGroup <-> XRef_AR_OrderGroup on OrdGroupJoin XRef_AR_OrderGroup <-> AR on ARIDand you should be able to get desired output.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|