marksmithy69
Programmer
I'm completely new to MS Access so I appologize for the simple question, but how do I write a simple query comparing two fields of different data types? Here is my query:
SELECT [ProEmployeeMaster].[last_name], [ProEmployeeMaster].[first_name], [ProEmployeeMaster].[ssnum], [ProEmployeeMaster].[GlobalID], [SapEmployeeMaster].[GlobalID]
FROM ProEmployeeMaster INNER JOIN SapEmployeeMaster ON FORMAT([ProEmployeeMaster].[ssnum],"000000000")=[SapEmployeeMaster].[SSN]
WHERE [ProEmployeeMaster.GlobalID]=[SapEmployeeMaster].[GlobalID];
Basically I am using the GlobalId on the ProEmployeeMaster table, which is a text data type and comparing it to the GlobalId on the SapEmployeeMaster table, which is a number format. Thanks in advance for your help.
SELECT [ProEmployeeMaster].[last_name], [ProEmployeeMaster].[first_name], [ProEmployeeMaster].[ssnum], [ProEmployeeMaster].[GlobalID], [SapEmployeeMaster].[GlobalID]
FROM ProEmployeeMaster INNER JOIN SapEmployeeMaster ON FORMAT([ProEmployeeMaster].[ssnum],"000000000")=[SapEmployeeMaster].[SSN]
WHERE [ProEmployeeMaster.GlobalID]=[SapEmployeeMaster].[GlobalID];
Basically I am using the GlobalId on the ProEmployeeMaster table, which is a text data type and comparing it to the GlobalId on the SapEmployeeMaster table, which is a number format. Thanks in advance for your help.