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
 General SQL Server Forums
 New to SQL Server Programming
 Joining Tables

Author  Topic 

matta0990
Starting Member

44 Posts

Posted - 2011-04-26 : 10:03:11
1

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2011-04-26 : 10:08:07
You just need to join with the Customers table...


Select
B.CustomerName,
A.*
From YourOtherTable A
Inner Join Customers B
On A.CustomerId = B.CustomerId


Corey

I Has Returned!!
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-04-26 : 10:08:57
select c.ID, c.Name from tbl t join Customer c on t.CoustomerID = c.ID



==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-05-22 : 16:26:36
You know it's really bad manners to edit out your question after people have helped you. Means that no one who runs across this from a search engine can benefit from it.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -