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
 PROBLEM

Author  Topic 

Xaris
Starting Member

2 Posts

Posted - 2012-12-06 : 09:27:05
I have two tables:
Table1:
RFIDtag Title Author Description Image ShelfNumber
2 CalculusI whatever whatever bytes 1
3 CalculusII whatever whatever bytes 1


Table2:
RFIDtag ANTENNa
1 1
2 1
3 1
4 1
5 1
6 1

I want to check if these tables have a common RFIDtag
and then display a table with the common RFIDtags,Title,author,description,image and add the column antenna from the 2nd table to the corresponding RFIDtag

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-12-06 : 09:33:36
select t1.RFIDtag,Title,author,description,image,antenna
from Table1 t1
join table2 t2
on t1.RFIDTag = t2.RFIDTag


==========================================
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

Xaris
Starting Member

2 Posts

Posted - 2012-12-07 : 05:54:43
thanks nigelrivett
Go to Top of Page
   

- Advertisement -