Taras
asked on
Append Null to date/time field
I am appending records from one table to another
And I am getting error that records are not appended because of validation rule error.
In table tblMasterRep Date filed is date/time filed type
In table for this field there is no option for allow Null value or not.
In table tblArchivedMaster Date filed is date/time type and could have null value.
Here is my query:
INSERT INTO tblMasterRep ( [DATE] )
SELECT IIf(IsNull([DATE]),Null,[D ATE])
FROM tblArchivedMaster;
I tried with : IIf(IsNull([DATE]),”Null”, [DATE])
Not working
Any Idea?
And I am getting error that records are not appended because of validation rule error.
In table tblMasterRep Date filed is date/time filed type
In table for this field there is no option for allow Null value or not.
In table tblArchivedMaster Date filed is date/time type and could have null value.
Here is my query:
INSERT INTO tblMasterRep ( [DATE] )
SELECT IIf(IsNull([DATE]),Null,[D
FROM tblArchivedMaster;
I tried with : IIf(IsNull([DATE]),”Null”,
Not working
Any Idea?
Are you dealing with an Access table? You should be able to directly insert nulls...
Check the validation rules and required properties in your table design.
FieldProperties.png
Check the validation rules and required properties in your table design.
FieldProperties.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If a null value is valid in the tblArchivedMaster table, the real answer should be that tblMasterRep should also allow null values. But if that cannot be changed, you'll need to use a value that will pass validation and that you can still recognize as a substitute for a null value.
Tom