R
Roy Gourgi
Hi,
I am trying to add a row to my table but I get the error message
"invalid column name SOBN and BN1" on this statement. Basically, I am trying
to add the row into the same table that I am searching if it does not find
SOBN = 5 and BN1 =3. What is the problem? Do I have to create a primary
key? Is it possible to have more than 1 primary key (i.e. secondary
....... ).
strCommand = "INSERT INTO tblSQL_2 (SOBN, BN1) SELECT SOBN , BN1 WHERE NOT
EXISTS (SELECT * FROM tblSQL_2 WHERE SOBN = 5 AND BN1 = 3)";
Thanks
Roy
I am trying to add a row to my table but I get the error message
"invalid column name SOBN and BN1" on this statement. Basically, I am trying
to add the row into the same table that I am searching if it does not find
SOBN = 5 and BN1 =3. What is the problem? Do I have to create a primary
key? Is it possible to have more than 1 primary key (i.e. secondary
....... ).
strCommand = "INSERT INTO tblSQL_2 (SOBN, BN1) SELECT SOBN , BN1 WHERE NOT
EXISTS (SELECT * FROM tblSQL_2 WHERE SOBN = 5 AND BN1 = 3)";
Thanks
Roy