Author |
Topic |
waynew
Starting Member
2 Posts |
Posted - 2006-09-18 : 08:47:38
|
I am trying to consolidate records from multiple tables in different databases to a master database. All tables will have the same structure. I tried the command: insert CrystalReports.dbo.APVEN(VENDORID, AUDTDATE, AUDTTIME, AUDTUSER, AUDTORG, SHORTNAME, IDGRP, SWACTV, DATEINAC, DATELASTMN, SWHOLD, DATESTART, IDPPNT, VENDNAME) select (VENDORID, AUDTDATE, AUDTTIME, AUDTUSER, AUDTORG, SHORTNAME, IDGRP, SWACTV, DATEINAC, DATELASTMN, SWHOLD, DATESTART, IDPPNT, VENDNAME) from Saminc.dbo.APVEN and I keep getting errors.
Is there a simple way to copy all records using an insert command? |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-18 : 08:53:38
|
remove the ( and ) in SELECT
insert CrystalReports.dbo.APVEN(VENDORID, AUDTDATE, AUDTTIME, AUDTUSER, AUDTORG, SHORTNAME, IDGRP, SWACTV, DATEINAC, DATELASTMN, SWHOLD, DATESTART, IDPPNT, VENDNAME) select VENDORID, AUDTDATE, AUDTTIME, AUDTUSER, AUDTORG, SHORTNAME, IDGRP, SWACTV, DATEINAC, DATELASTMN, SWHOLD, DATESTART, IDPPNT, VENDNAME from Saminc.dbo.APVEN
KH
|
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-09-18 : 11:27:44
|
When selecting data, you dont need to have columns withing braces
Madhivanan
Failing to plan is Planning to fail |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-18 : 11:36:26
|
To be precise,
The ( and ) are call Parentheses
braces are the { and }
KH
|
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-09-18 : 20:40:11
|
Well Tan. Thanks 
Madhivanan
Failing to plan is Planning to fail |
 |
|
|
|
|