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.
Author |
Topic |
offlyn
Starting Member
1 Post |
Posted - 2008-08-13 : 15:39:59
|
The follwoing sql works but I am looking for a better approach for doing this without using:from tbl1 ajoin tbl2 bon a.id = a.idINSERT INTO tbl3 a.[id], b.[id] [CreatedBy], [CreatedDate]select distinct a.id, b.id, 1234, getdatefrom tbl1 ajoin tbl2 bon a.id = a.idwhere b.ID IN 1,2,3and a.emailaddress in select distinct emailname from bulkuserupload The dataset would be:id1 id2 createdby createddate1 1 1234 12/1/20051 2 1234 12/1/20051 3 1234 12/1/20051 1 1234 12/1/20051 2 1234 12/1/20051 3 1234 12/1/2005Thanks in advance for you input. |
|
georgev
Posting Yak Master
122 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-14 : 14:40:05
|
Not sure what you're trying to do the join condition is wrong a.id = a.id. please post correct query or provide some sample data & explain. |
|
|
|
|
|