J
JIM
I'm trying to conctenate a field in a query for an export file. If length of
CustomerName is 40 I want the leftmost 38 positions and the 40th position in
a concatenated field CustName. Otherwise, if CustomerName is less that 40
positions I want CustName to be the leftmost 39 positions. My SQL is:
IIf (Len([Invoices].[CustomerName])=40, (Left([Invoices].[CustomerName]), 38
& Right ([Invoices].[CustomerName], 1)), Left([Invoices].[CustomerName]), 39)
AS CustName
I keep getting errors and can't get the right syntax. TIA
CustomerName is 40 I want the leftmost 38 positions and the 40th position in
a concatenated field CustName. Otherwise, if CustomerName is less that 40
positions I want CustName to be the leftmost 39 positions. My SQL is:
IIf (Len([Invoices].[CustomerName])=40, (Left([Invoices].[CustomerName]), 38
& Right ([Invoices].[CustomerName], 1)), Left([Invoices].[CustomerName]), 39)
AS CustName
I keep getting errors and can't get the right syntax. TIA