简体   繁体   English

表名称中带有斜杠的DB2查询

[英]DB2 query with slash in table name

please I have table name SAPPRD./CS1/TB2_SOPBV and I can´t do this query: 请使用表名称SAPPRD./CS1/TB2_SOPBV ,但不能执行以下查询:

transfer ownership of table SAPPRD./CS1/TB2_SOPBV TO USER SAPQAS preserve privileges;

I am getting error: 我收到错误消息:

DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. DB21034E由于该命令不是有效的命令行处理器命令,因此已作为SQL语句处理。 During SQL processing it returned: SQL0104N An unexpected token "/CS1/" was found following "hip of table SAPFIP.". 在SQL处理期间,它返回:SQL0104N在“表SAPFIP的hip”之后找到了意外的标记“ / CS1 /”。 Expected tokens may include: "". 预期的令牌可能包括:“”。 SQLSTATE=42601 SQLSTATE = 42601

So I tried to do escaping, I edited query to: 因此,我尝试进行转义,将查询编辑为:

transfer ownership of table SAPPRD.\"/CS1/TB2_SOPBV" TO USER SAPQAS preserve privileges

But It will not escape, I am still getting error: 但是它不会逃脱,我仍然会收到错误:

DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. DB21034E由于该命令不是有效的命令行处理器命令,因此已作为SQL语句处理。 During SQL processing it returned: SQL0007N The statement was not processed because a character that is not supported in SQL statements was included in the SQL statement. 在SQL处理期间,它返回:SQL0007N该语句未处理,因为SQL语句中包含SQL语句不支持的字符。 Invalid character: "\\". 无效字符: ”\\”。 Text preceding the invalid character: "hip of table SAPPRD.". 无效字符之前的文本:“表SAPPRD的臀部”。 SQLSTATE=42601 SQLSTATE = 42601

Is possible to do escaping here and proceed with this query? 是否可以在此处进行转义并继续执行此查询?

Thank you! 谢谢!

解决了!

transfer ownership of table SAPPRD."/CS1/TB2_SOPBV" TO USER SAPQAS preserve privileges

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

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