I would like to take 5 columns (Addr Number, Addr Suffix, Addr Prefix, Addr Street Name, Addr Street Type) and create one column. Some of the columns are blank and have Null values. I am struggling with the right code for this. Please help
I would like to take 5 columns (Addr Number, Addr Suffix, Addr Prefix, Addr Street Name, Addr Street Type) and create one column. Some of the columns are blank and have Null values. I am struggling with the right code for this. Please help
Welcome to the forum!
I'm not sure what you want to do with the null fields or what format you want, but the let's say that you want each field separated by a space. That would look like this (in a query):
SELECT [Addr Number] & " " & [Addr Suffix] & " " & [Addr Prefix] & " " & [Addr Street Name] & " " & [Addr Street Type] as FullAddress
FROM tablename
If you do not do anything to handle the null fields then you would just have a few extra spaces.
By the way, I generally recommend that you do no have spaces or special characters in your table or field names. It would save having to enclose the names in square brackets.
Try:
[Addr Number] & " " + [Addr Suffix] & " " + [Addr Prefix] & " " & [Addr Street Name] & " " + [Addr Street Type]
That works! Ok, So here is another one if you would like to take it on....
I have to create a mailer, but my data base is seperated by individual. I dont want to send 4 mailers to the same house. (4 people live there)
How do I create a report/label/whatever for each mailing address, not person.