K
kcalanyuan
I have two databases with same column name, I want to combine all the
data into a temp table in the fly, after display the result then drop
the table, like below
dbA
FNo FName Amount
101 BBB 100
102 CCC 200
dbB
FNo FName Amount
101 BBB 400
102 CCC 500
dbtemp
FNo FName Amount
101 BBB 500
102 CCC 700
I used the following clause but failed,
SQL = "CREATE TABLE dbtemp (FNo varchar(10), FName varchar(100),
DAmount INT)"
SQL = " And SELECT FNo, FName, Amount INTO dbtemp IN 'dbA.mdb' FROM
'dbA'"
SQL = " And SELECT FNo, FName, Amount INTO dbtemp IN 'dbB.mdb' FROM
'dbB'"
Set rs = GetMdbRecordset( "dbtemp", SQL)
Can anyone help me ? Thanks !
data into a temp table in the fly, after display the result then drop
the table, like below
dbA
FNo FName Amount
101 BBB 100
102 CCC 200
dbB
FNo FName Amount
101 BBB 400
102 CCC 500
dbtemp
FNo FName Amount
101 BBB 500
102 CCC 700
I used the following clause but failed,
SQL = "CREATE TABLE dbtemp (FNo varchar(10), FName varchar(100),
DAmount INT)"
SQL = " And SELECT FNo, FName, Amount INTO dbtemp IN 'dbA.mdb' FROM
'dbA'"
SQL = " And SELECT FNo, FName, Amount INTO dbtemp IN 'dbB.mdb' FROM
'dbB'"
Set rs = GetMdbRecordset( "dbtemp", SQL)
Can anyone help me ? Thanks !