Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2017
    Posts
    2
    Provided Answers: 1

    Answered: DB2 query with slash in table name

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

    Code:
    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: "<space>". SQLSTATE=42601
    So I tried to do escaping, I edited query to:
    Code:
    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!

  2. Best Answer
    Posted by Desttro

    "Solved!
    Code:
    transfer ownership of table SAPPRD."/CS1/TB2_SOPBV" TO USER SAPQAS preserve privileges
    "


  3. #2
    Join Date
    Jan 2017
    Posts
    2
    Provided Answers: 1
    Solved!
    Code:
    transfer ownership of table SAPPRD."/CS1/TB2_SOPBV" TO USER SAPQAS preserve privileges

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •