jkruer01
09-05-2004, 01:34 PM
Hello,
I am trying to create a SQL query against a MS Access database where I concatenate a numeric field with text and text fields.
I have concatenated multiple text fields using + and it works great. However, when I try to do this with a number field it just returns a 0.
Here is my code:
SQL = "SELECT Donor.PersonID + '|' + Donor.LastName + ', ' + Donor.FirstName + ' ' + Donor.MiddleName AS PersonID, Donor.LastName + ', ' + Donor.FirstName + ' ' + Donor.MiddleName AS Name "
SQL = SQL & "FROM Donor "
Any suggestions?
Thanks!
I am trying to create a SQL query against a MS Access database where I concatenate a numeric field with text and text fields.
I have concatenated multiple text fields using + and it works great. However, when I try to do this with a number field it just returns a 0.
Here is my code:
SQL = "SELECT Donor.PersonID + '|' + Donor.LastName + ', ' + Donor.FirstName + ' ' + Donor.MiddleName AS PersonID, Donor.LastName + ', ' + Donor.FirstName + ' ' + Donor.MiddleName AS Name "
SQL = SQL & "FROM Donor "
Any suggestions?
Thanks!