Register table creation error

I am trying to create a registered table but while trying to register the table, it gives a sytax error.

EXECUTE exec_sql with query = 'CREATE TABLE ORGANIZATION(ORGANIZATION_UID VARCHAR2(30), ORGANIZATION_NAME VARCHAR2(250), ADDRESS VARCHAR2(500))'

The above query ran fine through DQL but next while running the below DQL to register the table it throws a syntax error -

REGISTER TABLE dm_dbo.ORGANIZATION(ORGANIZATION_UID CHAR(30), ORGANIZATION_NAME CHAR(250), ADDRESS CHAR(500))

Error occurred during query execution: [DM_QUERY_E_SYNTAX]error :"A parser error (syntax error) has occurred in the vicinity of: REGISTER TABLE dm_dbo.ORGANIZATION(ORGANIZATION_UID CHAR(30), ORGANIZATION_NAME CHAR(250), ADDRESS"

Comments

  • ADDRESS is a reserved word in DQL. As a best practice I try to avoid attribute/column names which consist in a single word. The likelyhood that you hit a reserved word is quite high (you need to consider reserved words in DQL but also for each target database, Oracle, SQLServer, etc). Your options:

    • Enclose ADDRESS in double-quotes (but you will need to do the same each time you run a query against this column)
    • Rename the column, e.g. ORG_ADDRESS
    • Skip the list of attributes in your DQL statement as the Content Server doesn't really care (just include a DUMMY column or the first one or whatever). But again, you will need to enclose the ADDRESS column in double-quotes each time you query that column.