Can anyone help me with this SQL syntax?
strSQL = “INSERT INTO tblFromCMISMasterRecord ( MasterRecordID, SSN, FirstName, MiddleInitial, LastName, AddressLine1, AddressLine2, ZipCodeID, PhoneNumber, DOB, Age, Sex, CaseManagerID, ChangeDate )”
strSQL = strSQL & ” SELECT tblMasterRecord.MasterRecordID, Format([PIN],”000-00-0000″) AS SSN, tblMasterRecord.FirstName, tblMasterRecord.MiddleInitial, tblMasterRecord.LastName, tblMasterRecord.AddressLine1, tblMasterRecord.AddressLine2, tblMasterRecord.ZipCodeID, tblMasterRecord.PhoneNumber, tblMasterRecord.DOB, tblMasterRecord.Age, tblMasterRecord.Sex, tblMasterRecord.CaseManagerID, tblMasterRecord.ChangeDate ”
strSQL = strSQL & ” FROM tblMasterRecord;”
Access doesn’t like the part about FORMAT([PIN], “000-00-0000”) AS SSN in my SQL statement when I try to run in from code.