General
cancel
Showing results for 
Search instead for 
Did you mean: 

Substr of field while concatenating two fields

Francine Harris
Occasional Advisor

Substr of field while concatenating two fields

I am trying to concat two fields with the second field being a substr of last 4 characters. I am using syntax of:

COLUMNS=CONCAT([VANTIVE_HRINFO].[LAST_NAME]),CONCAT(REPLACE(REPLACE(REPLACE(REPLACE(SUBSTR([VANTIVE_HRINFO].[EMPLID]),6,4)), ' ', ''), '&', ''), '_', ''), '%', '')) AS [SEARCHCODE], \
but get a sql error. Can anyone figure out what is wrong with this statement?

Thanks.
1 REPLY
Michael Schulte zur Sur
Honored Contributor

Re: Substr of field while concatenating two fields

Hi,

SUBSTR([VANTIVE_HRINFO].[EMPLID]),6,4)),
Isn't the first ) too early?

SUBSTR([VANTIVE_HRINFO].[EMPLID],6,4)),
would be my guess.

greetings,

Michael