|
-
Oct 1st, 2004, 08:50 AM
#1
Thread Starter
PowerPoster
I searched this but couldn't get a definitive
answer. I need a relatively quick, painless SQL statement for taking selecting * data from * tables in a DB, and placing all the data into another DB, which is already configured exactly as the one it's coming from. Same table names, same field names, same data types. So my question is, do I have to do select * and then insert value statements for each table? Or is there some group dump command I'm not aware of?
Also, in VB6, how do I get the entire record of table A, into the insert statement for table B? Do I place the rs.Recordset into a variable? Thanks much in advance, for any help.
-
Oct 1st, 2004, 09:07 AM
#2
The sticky post at the top for sql statements..
Code:
Insert Into <tablename> ( <field>,<field>,<etc> )
Select [Tablename].[fieldname],[tablename].[fieldname],[etc].[etc]
From [tablename]
Run one for each table.
Use VBA code to loop through tables to automatically copy... Note Auto fields may change values...
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Oct 1st, 2004, 09:11 AM
#3
Thread Starter
PowerPoster
Thanks. I guess there's no tidier way to do it. I was hoping I could just select *, then somehow concatenate the recordset, or place it's entire string in variable, and into the insert statement. Of if there was a command that dumped all tables , that would've been best.
-
Oct 1st, 2004, 10:38 AM
#4
Originally posted by mendhak
A small web-based (aspx?) or java-based chatroom, linked to from vbforums, so you log in with your own username+password, would be a good idea.
It'll be just like chit chat at a faster speed.
And just as bizzaar
-
Oct 1st, 2004, 11:17 AM
#5
Thread Starter
PowerPoster
Something tells me that post wasn't intended for this thread.
-
Oct 1st, 2004, 11:23 AM
#6
That is spooky ... it was meant for this thread:
http://www.vbforums.com/showthread.p...77#post1802775
Indeeed I pressed the reply button on that thread, havn't seen this one until now, so how the reply got here is a mystery.
-
Oct 1st, 2004, 12:28 PM
#7
Thread Starter
PowerPoster
Well you know what they say, "Bit Happens".
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|