Is there any best way tho achive the the result same as max or min does gives???
i find the query performance getting hampered becoz of the min function i m using in my query and if i comment the aggregate function it work absolutely fine..!!
please let me know how to write the optimize function for the beloq syntax..!!
just an FYI, clssfctn_scp and AC are two different table..!!
I have a query in SQL server using PIVOT function, samle query working in SQL server like -
select PT.* from (select FName, LName, RDate, Rank from Tab_Ranking)sq
pivot (max(Rank) for RDate in ([2013-08-20], [2013-08-21])) as PT
What would be the equivalent query or presentation in Teradata? Please help.
Posting the same question repeatedly will not provide you with any additional answer than the one posted by Raja:
MIN(CASE WHEN clssfctn_scp.scp='LI' THEN AC.abc_clssfctn ELSE '' END ) AS ABC_Classification_LI
, MIN(CASE WHEN clssfctn_scp.scp='HC' THEN AC.abc_clssfctn ELSE '' END ) AS ABC_Classification_HC
, MIN(CASE WHEN clssfctn_scp.scp='CL' THEN AC.abc_clssfctn ELSE ''END ) AS ABC_Classification_CL
here AC.abc_clssfctn filed have value ranging from A-D where A is good and D bad,
so what we want select the good classification level for the clssfctn_scp.scp in LI,HC,CL..!!
does it make sense dnoeth??????????