简体   繁体   中英

DB2 query with slash in table name

please I have table name SAPPRD./CS1/TB2_SOPBV and I can´t do this query:

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. During SQL processing it returned: SQL0104N An unexpected token "/CS1/" was found following "hip of table SAPFIP.". Expected tokens may include: "". 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. 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. Invalid character: "\\". Text preceding the invalid character: "hip of table SAPPRD.". 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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