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 2008 Forums
 Transact-SQL (2008)
 SELECT over two tables.

Author  Topic 

RobertStewart
Starting Member

7 Posts

Posted - 2011-09-14 : 04:36:50
Hi all,
I have two tables, the first table, History, has events recorded by a number. The second table, Events, has a list of these event numbers and corresponding text. How can I create a third table, containing everything in the History table, but with an extra field containing the text from the second table?

Thanks!
Robert.

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2011-09-14 : 06:16:44
can you please provide sturcture of your tables and some sample data.

--------------------------
http://connectsql.com/
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2011-09-14 : 07:38:12
This looks like homework. Use an inner join, linking history.number to event.number

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -