SAS PROC SQL TRIM 语句
我在使用 TRIM st 时遇到问题
这是我收到的错误;
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'.
这是它所引用的代码示例;
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
谁能告诉我代码有什么问题吗?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
考虑使用 COMPRESS(),它在删除空格和连接字符串时很有帮助。
Consider COMPRESS() which can be helpful when removing blanks and concatinating strings.
您是否尝试过 LTRIM RTRIM 而不是普通 Trim?
Did you try LTRIM RTRIM Instead normal Trim?