lucia
October 26th, 2006, 01:35 PM
Hi, I am new here. Hope some one can help me out.
I use sql server database and vb6 as front end.
I want to insert data from table1 to table2. These two tables are exactly the same. But I want to left join table1 with table3 with some criteria. Here is my code.
Sql = "Insert table2 select Table1.*, table3.field1 "
sql = sql & "From table1 left join table3 "
sql = sql & "On table1.field = table3.field"
sql = sql & "Where............"
I got an error msg while I was runing the code: column name or number of supplied value doesn't macth table definition.
Can any one help me out?
Thanks in advance.
I use sql server database and vb6 as front end.
I want to insert data from table1 to table2. These two tables are exactly the same. But I want to left join table1 with table3 with some criteria. Here is my code.
Sql = "Insert table2 select Table1.*, table3.field1 "
sql = sql & "From table1 left join table3 "
sql = sql & "On table1.field = table3.field"
sql = sql & "Where............"
I got an error msg while I was runing the code: column name or number of supplied value doesn't macth table definition.
Can any one help me out?
Thanks in advance.