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 2005 Forums
 Transact-SQL (2005)
 Need query

Author  Topic 

pradeep_iete
Yak Posting Veteran

84 Posts

Posted - 2008-06-25 : 07:26:34


Hi guys
TableName : A
orderID LocationID RoleID
1 27 1
2 35 5
3 65 6
4 27 1


Select orderID,LocationID From A where LocationID=27

I want my result set to be like that for locationID


Result set
---------------------
1 Noland
4 Noland
--------------------

HOWWWWW???

ganeshkumar08
Posting Yak Master

187 Posts

Posted - 2008-06-25 : 07:39:04
Select Base.orderID,Loc.LocationName From A Base
inner Join LocationTable Loc On Loc.LocationID = Base.LocationID
where LocationID=27
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-25 : 07:47:43
quote:
Originally posted by pradeep_iete



Hi guys
TableName : A
orderID LocationID RoleID
1 27 1
2 35 5
3 65 6
4 27 1


Select orderID,LocationID From A where LocationID=27

I want my result set to be like that for locationID


Result set
---------------------
1 Noland
4 Noland
--------------------

HOWWWWW???


where is Noland value stored in?
Go to Top of Page
   

- Advertisement -