I have a table, containing the following data points:
ACCT_NUM
ST_NUM1
ST_DIR
ST_NAME1
ST_SUFFIX
SUITE
SITE_ADDR
Using an update query, I want to concatenate and trim:
ST_NUM1
ST_DIR
ST_NAME1
ST_SUFFIX
SUITE
and place into the SITE_ADDR field, so that the data in SITE_ADDR looks like (for different scenarios):
N Main Street #107
Main Street #107
Main Street
Smith Rd #10
Smith #10
W Central Ave #505
(no spaces where ST_DIR is null AND no spaces where ST_SUFFIX is null if SUITE exists)
Is there a way to use this query for the above? I keep getting the following error: "undefined function 'Trim' in expression".
SITE_ADDR: [ST_DIR1]+" " & Trim([ST_NAME1]) & " "+[ST_Suffix] & " "+[SUITE]
I get the same error for this longer version of the query:
SITE_ADDR: IIf(Nz([ST_DIR1],""), [ST_DIR1], " ") & Trim([ST_NAME1]) & " " & IIf(Nz([ST_SUFFIX],""), [ST_SUFFIX], " ") & Trim([SUITE])
If I could get either one of them to work, that would be great. Thanks in advance for your assistance.
Kelly
ACCT_NUM
ST_NUM1
ST_DIR
ST_NAME1
ST_SUFFIX
SUITE
SITE_ADDR
Using an update query, I want to concatenate and trim:
ST_NUM1
ST_DIR
ST_NAME1
ST_SUFFIX
SUITE
and place into the SITE_ADDR field, so that the data in SITE_ADDR looks like (for different scenarios):
N Main Street #107
Main Street #107
Main Street
Smith Rd #10
Smith #10
W Central Ave #505
(no spaces where ST_DIR is null AND no spaces where ST_SUFFIX is null if SUITE exists)
Is there a way to use this query for the above? I keep getting the following error: "undefined function 'Trim' in expression".
SITE_ADDR: [ST_DIR1]+" " & Trim([ST_NAME1]) & " "+[ST_Suffix] & " "+[SUITE]
I get the same error for this longer version of the query:
SITE_ADDR: IIf(Nz([ST_DIR1],""), [ST_DIR1], " ") & Trim([ST_NAME1]) & " " & IIf(Nz([ST_SUFFIX],""), [ST_SUFFIX], " ") & Trim([SUITE])
If I could get either one of them to work, that would be great. Thanks in advance for your assistance.
Kelly