Gary Samuels
asked on
help with insert if statement
Need to copy data from FirstMiddle field to Salutation field if FirstMiddle is not empty and Salutation is empty. I've been trying this:
But I'm getting a syntax error, can anyone help?
INSERT INTO [Shelby].[NANames] ([Salutation])
VALUES [Shelby].[NANames] ([FirstMiddle]);
WHERE (([Shelby].[NANames].[FirstMiddle] <> '') AND ([Shelby].[NANames].[Salutation] = '') )
But I'm getting a syntax error, can anyone help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Note that empty string is not the same as NULL, so I have checked for both.