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.APVENand 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 SELECTinsert 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, VENDNAMEfrom 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 bracesMadhivananFailing 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 Parenthesesbraces are the { and } KH |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-09-18 : 20:40:11
|
Well Tan. Thanks MadhivananFailing to plan is Planning to fail |
|
|
|
|
|