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 |
|
tlouvierre
Starting Member
8 Posts |
Posted - 2010-08-31 : 14:58:10
|
| SELECT *INTO KudlerFineFoods_InformationServices_BackupFROM KudlerFineFoods_EmployeeID_Table1, KudlerFineFoods_EmployeeID_Table2INNER JOIN KudlerFineFoods_EmployeeID_Table1, KudlerFineFoods_EmployeeID_Table2ON KudlerFineFoods_EmployeeID_Table1.P_Id = KudlerFineFoods_EmployeeID_Table2.P_IdMsg 102, Level 15, State 1, Line 5Incorrect syntax near ','.Tiffany D. Louvierre-Ramirez |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-08-31 : 15:16:50
|
| [code]SELECT *INTO KudlerFineFoods_InformationServices_BackupFROM KudlerFineFoods_EmployeeID_Table1INNER JOIN KudlerFineFoods_EmployeeID_Table2ON KudlerFineFoods_EmployeeID_Table1.P_Id = KudlerFineFoods_EmployeeID_Table2.P_Id[/code] |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-08-31 : 15:17:24
|
or thisSELECT *INTO KudlerFineFoods_InformationServices_BackupFROM KudlerFineFoods_EmployeeID_Table1 t1INNER JOIN KudlerFineFoods_EmployeeID_Table2 t2ON t1.P_Id = t2.P_Id |
 |
|
|
tlouvierre
Starting Member
8 Posts |
Posted - 2010-09-01 : 19:28:36
|
| Hi Russell, Thank you for your response. I tried the code and it just runs in the debug query. It does not stop. What I have been trying to do is merge the above two tables using JOIN. The text book has several examples but none of them match what I am trying to do. I have tried being imaginative and using my brain to try and mix and match my own version and no dice. I am suffering with projects in SQL server 2008 that I can not get finished. My next weeks projects rely on the fact I get these to function. Am I in the right direction? I now I should have back files but I do not know if there is a quicker way of doing this merging of two tables.Tiffany D. Louvierre-Ramirez |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-09-01 : 20:51:36
|
| Maybe you're trying to UNION the tables instead of JOIN them?Post the table structures, a few sample rows and the expected output. I'm sure we'll help you get it straightened out. |
 |
|
|
|
|
|