AnsweredAssumed Answered

Pivot: Is it possible to create NSQL with Pivot query?

Question asked by Suhas Kamble on Jul 28, 2015
Latest reply on Jul 29, 2015 by Suhas Kamble

I receive invalid identifier GIRC3 when I create NSQl query that has pivot like one mentioned below. this is sample I found online


 

SELECT  @SELECT:DIM:USER_DEF:IMPLIED:PRJ:T.CODE:Project_ID@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.Name:Project_name@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.L1:L1@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.L2:L2@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.L3:L3@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.GIRC:GIRC@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.GIRC2:GIRC2@,

        @SELECT:DIM_PROP:USER_DEF:IMPLIED:PRJ:T.GIRC3:GIRC3@

FROM    (

Select * from (

select inv.name,inv.code,otk.gate_launch ,pt.prstart from inv_investments inv, prtask pt,odf_ca_task otk

where otk.id = pt.prid

and pt.prprojectid=inv.id

)

pivot

(

max(prstart)

for gate_launch in ('L1','L2','L3','GIRC','GIRC2','GIRC3')

)

)T

Where      @FILTER@

Outcomes