View Full Version : Invalid use of null


Fuga
07-29-2003, 04:36 AM
I´m trying to append rows to a table. I´m using a missmatch query to do this, since I cannot use PKs. I get the message invalid use of null

It´s probably some logical misstake I´ve made, but I need help to see it.

This is the sql:

INSERT INTO TBL2 ( Field1, Field3, Field5, Field6, Field7 )
SELECT TBL1.Field1, TBL1.Field3, TBL1.Field5, TBL1.Field6, TBL1.Field7
FROM TBL1 LEFT JOIN Query1 ON TBL1.spärrfält = Query1.spärrfält
WHERE (((Query1.spärrfält) Is Null));

Thanks

Fuga.

dcx693
07-29-2003, 06:24 AM
Don't see any problems with the SQL, the only thing I can think of at the moment is that one of the fields you're appending to is indexed or requires a non-null entry and you're trying to append an empty value. Are all those fields from TBL1 non-Null?

Fuga
07-29-2003, 06:49 AM
Yes, they should be non-nulls. Another thing:

When I try to create this query with the wizard, I get the message you cancelled the previous operation when it is about to display the results.

Fuga.