简体   繁体   English

SAS PROC SQL修剪声明

[英]SAS PROC SQL TRIM STATEMENT

I am having problems with a TRIM st 我在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. 谢谢。

考虑一下COMPRESS(),它在删除空格和隐藏字符串时会很有帮助。

您是否尝试过LTRIM RTRIM而不是普通修剪?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM