All Forums Database
JerryLusa 23 posts Joined 08/13
20 Oct 2014
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

Jerry L.
dnoeth 4628 posts Joined 11/04
20 Oct 2014

Hi Jerry,
your query is syntactically correct.
Are you sure you run it on 14.10?

Dieter

JerryLusa 23 posts Joined 08/13
21 Oct 2014

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

Jerry L.

JerryLusa 23 posts Joined 08/13
21 Oct 2014

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

Jerry L.

dnoeth 4628 posts Joined 11/04
21 Oct 2014

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.

Dieter

JerryLusa 23 posts Joined 08/13
21 Oct 2014

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

 

Jerry L.

JerryLusa 23 posts Joined 08/13
22 Oct 2014

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

Jerry L.

Raja_KT 1246 posts Joined 07/09
22 Oct 2014

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.

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

dnoeth 4628 posts Joined 11/04
22 Oct 2014

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

Dieter

JerryLusa 23 posts Joined 08/13
22 Oct 2014

Thanks Dieter

Jerry L.

JerryLusa 23 posts Joined 08/13
24 Oct 2014

Resolution:  this is fixed in DR 171445 fix in TDBMS_14.10.2.9_GCA. There is no workaround [for earlier 14.10 releases]

 

Jerry L.

You must sign in to leave a comment.