TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Database

TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

The 14.10 help for TD_UNPIVOT has two examples, one with SELECT... FROM UNPIVOT, and another with SELECT... FROM TD_UNPIVOT.  Neither are working.

The UNPIVOT variation fails with "SELECT Failed.  [3707] Syntax error. expected something like ";" between the word UNPIVOT and '('. "

The TD_UNPIVOT variation fails with "SELECT Failed.  [9134] TD_UNPIVOT_CONTRACT"

Here's a TD_UNPIVOT test...

SELECT TOP 100 Userid, Metric, Val FROM TD_UNPIVOT

(

    ON DBC.QryLog

    USING

    VALUE_COLUMNS('Val')

    UNPIVOT_COLUMN('Metric')

    COLUMN_LIST('NumSteps', 'NumStepswPar', 'MaxStepsInPar')

) AS X

Release is 14.10.02.01

Version is 14.10.02.08c

Tags (1)
10 REPLIES
N/A

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Hi Jerry,

your query is syntactically correct.

Are you sure you run it on 14.10?

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Yes, I got the release and version from querying dbc.dbcinfo in the same session.

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

What's the next step?  Does this indicate a problem with the upgrade from V13 we did back in May? 

N/A

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Hi Jerry,

I think this function is installed by one of the DIP scripts during upgrade, maybe it didn't run.

If select DatabaseName from dbc.FunctionsV where FunctionName = 'TD_UNPIVOT' doesn't return a row you should talk to your dba.

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Dieter,

The function shows up in...

TD_SYSFNLIB

Prefacing the function with the databasename still returns the error:

"SELECT Failed.  [9134] TD_UNPIVOT_CONTRACT"

SELECT TOP 100 Userid, Metric, Val FROM TD_SYSFNLIB.TD_UNPIVOT

(

    ON DBC.QryLog

    USING

    VALUE_COLUMNS('Val')

    UNPIVOT_COLUMN('Metric')

    COLUMN_LIST('NumSteps', 'NumStepswPar', 'MaxStepsInPar')

) AS X

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Any ideas on how to get TD_UNPIVOT to work?  It doesn't appear to be a permissions problem, right?

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

You can work out with query. You can test  with  sample data of what you have and what you want to achieve, you can tweak.

N/A

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

I don't know why it's failing, you might open an incident with TD customer service to check what's wrong.

Re: TD_UNPIVOT throwing error: SELECT Failed. [9134] TD_UNPIVOT_CONTRACT; Help is confusing

Thanks Dieter