Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mrm23
Posting Yak Master
198 Posts |
Posted - 2010-04-08 : 01:40:46
|
| Hi,I have a query which selects nearly 30 columns.of these 20 columns are pivoted useing case/isnull statements. it seems like: ISNULL(Cast((Select Amount From HC_RESUME_SALARY_STRUCTURE WITH(NOLOCK)Where ResumeID = a.ResID And HeaderItemID = '13')as nVarChar),'') as 'Basic' There are 20 such statements.I have to tune the query now. How else can i achieve the same? I dont think pivot will work as i have columns from other tables and these statements have aliases...Help me.Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-08 : 05:16:56
|
| show some sample data from table and explain what you want as output------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|