Rob G
Rob G

Reputation: 11

SAS PROC SQL TRIM STATEMENT

I am having problems with a TRIM st

This is the error that I am receiving;

ERROR: CLI prepare error: [Teradata][ODBC Teradata Driver][Teradata Database]
       Syntax error, expected something like ')' between a string or a Unicode
       character literal and the integer '9'.

And this is a sample of the code it is refering to;

select trim(a.BR_CBS_CUST(FORMAT "9(4)")) || trim(a.STEM_CBS_CUST(FORMAT "9(6)")) || 
  trim(a.ACTP_CBS_CUST) || trim(a.CDG_CBS_CUST)  (char(20))as CUSTNO

Can anyone tell me what is wrong with the code?

Thanks.

Upvotes: 1

Views: 8674

Answers (2)

Murray
Murray

Reputation: 729

Consider COMPRESS() which can be helpful when removing blanks and concatinating strings.

Upvotes: 1

alexcuban
alexcuban

Reputation: 11

Did you try LTRIM RTRIM Instead normal Trim?

Upvotes: 0

Related Questions