jadams0173
Technical User
- Feb 18, 2005
- 1,210
I want to put some data from an 2 dim array into a table if it doesn't exist. Here's what I'm doing.
I'm stuck as to how to check to see that the data does not already exist.
I've tried
Code:
For x = LBound(aryParentChild, 2) To UBound(aryParentChild, 2)
conn.Execute "Insert Into tblMy_Parent_Child (Parent,Child) " _
& "values ('" & aryParentChild(1, x) & "','" & aryParentChild(2, x) & "')", , 129
Next x
I'm stuck as to how to check to see that the data does not already exist.
I've tried
Code:
INSERT INTO tblMy_Parent_Child ( Parent, Child )
SELECT '188D5338G1Q375B' AS Expr1, '19D903197G3375A' AS Expr2
WHERE EXPR1<>'188D5338G1Q375B' and expr2<>'19D903197G3375A';