SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 PROBLEM
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Xaris
Starting Member

Cyprus
2 Posts

Posted - 12/06/2012 :  09:27:05  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 12/06/2012 :  09:33:36  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
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

Cyprus
2 Posts

Posted - 12/07/2012 :  05:54:43  Show Profile  Reply with Quote
thanks nigelrivett
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000