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 |
|
WonkyGibbon
Starting Member
3 Posts |
Posted - 2005-04-21 : 05:40:56
|
| Hi there,I'm writing a module that as part of it's job has to make a backup copy of a bunch of tables prior to altering them. Becuase the module has to be useable Oracle, DB2 & SQLServer - we're using ODBC and SQL to do this.For Oracle & DB2 - the following SQL works :CREATE TABLE BackupFred AS SELECT * FROM FredThe important point being that I don't have to know about the structure of "Fred", to do this.Now, I just can't see how to do this in SQL Server - any pointers would be a huge help.Many thanks |
|
|
satishdg
Starting Member
10 Posts |
|
|
WonkyGibbon
Starting Member
3 Posts |
Posted - 2005-04-21 : 06:46:04
|
| Obviously - being cross platform, we can't use a stored procedure - but it's possible that the following (extracted from your link) may work - I'll have to test ...select * into BackupDBName.dbo.Fred from Fredor maybe evenselect * into BackupFred from Fred |
 |
|
|
WonkyGibbon
Starting Member
3 Posts |
Posted - 2005-04-21 : 06:49:44
|
| Yes - that works.Thanks guys. |
 |
|
|
|
|
|