Hi,
I'm trying to specify in SQL to be run within VBA code using the DoCmd.RunSQl command to insert into table 1, all the records from table 2 except records where the first field in table 2 is not equal to the column name and where both fields 1 and 2 of a record are blank. Unfortunatley I have tried variants of the following but it only returns a record that has both its first two fields populated and not fields were only one of the two is empty:
WHERE tmpBL.F1 <> 'column name' AND ((tmpBL.F1<> '') AND (tmpBL.F2 <> ''))
also tried:
WHERE tmpBL.F1 <> 'column name' AND (tmpBL.F1 AND tmpBL.F2 <> '')
I'm trying to specify in SQL to be run within VBA code using the DoCmd.RunSQl command to insert into table 1, all the records from table 2 except records where the first field in table 2 is not equal to the column name and where both fields 1 and 2 of a record are blank. Unfortunatley I have tried variants of the following but it only returns a record that has both its first two fields populated and not fields were only one of the two is empty:
WHERE tmpBL.F1 <> 'column name' AND ((tmpBL.F1<> '') AND (tmpBL.F2 <> ''))
also tried:
WHERE tmpBL.F1 <> 'column name' AND (tmpBL.F1 AND tmpBL.F2 <> '')