Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
1. First Create the Database
2. Then create the tables
3. Insert the data
4. I would like to merge Table1, Table2 and Table3 based on matching ID's.
Table Data is:
5. The logic and the expected result is:
IF ID is found THEN
return field1 OR field2 OR field3 from Table1 OR Table2 OR Table 3
return values from DESTINATION table
6. The actual result we get after executing the query:
can you give me some ideas how to do this? i have table1 and table2. i want to copy the ...
Select * from Table1 and Select * from Table2
Just wondering if this is the best way to do this update statement:
What's the difference between using Table1, Table2 in FROM or using a join between both tables?...
I have table1 like so:
ID Mo Year In1 In2
A 1 2004 1 1
A 2 ...