al4629740
asked on
Transfer records from one table to another
I am trying to select certain records from one table and then place ALL the values retrieved into another table.
For example, if I retrieve all the records (Text1,Text4,Text5,Text7) for Table A. How can I save the records temporarily, so that I can close the current table and then open another table so that I can place all the data in Table B?
Hope that makes sense.
For example, if I retrieve all the records (Text1,Text4,Text5,Text7) for Table A. How can I save the records temporarily, so that I can close the current table and then open another table so that I can place all the data in Table B?
Hope that makes sense.
If conn.State = adStateClosed Then
conn.Open "Provider=sqloledb;Data Source=" & ConnectionIP & ",1433;Network Library=DBMSSOCN;Initial Catalog= CAPRegistration; User ID=sa;Password=xxxx"
End If
esql = "select Text1 , Text4, Text5, Text7 From tblRegistration Where Committee = " & ravi & DataGridOrganization & ravi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
They are in separate dbs.
Also, yes I need to add a new record when pasting the fields
Also, yes I need to add a new record when pasting the fields
good morning!
if they're in different dbase, then u need 2 connection string...
game-master
ASKER
will it automatically add a new record?
INSERT INTO TABLEB ("Text1 , Text4, Text5, Text7) select Text1 , Text4, Text5, Text7 From tblRegistration
INSERT INTO TABLEB ("Text1 , Text4, Text5, Text7) select Text1 , Text4, Text5, Text7 From tblRegistration
YES IT WILL...
THE RS! MEANS YOUR POINTING ON THE REcords on your 'rs' recordset...
game-master
ASKER
INSERT INTO TABLEB ("Text1 , Text4, Text5, Text7) select Text1 , Text4, Text5, Text7 From tblRegistration
Is there suppose to be quotation marks before Text1 ?
Is there suppose to be quotation marks before Text1 ?
REMOVE THE QUOTATION MARK BEFORE THE TEXT1....
ASKER
YOURTABLE is my destination table?
also, what does "rs!" represent?