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 |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-11-17 : 10:24:04
|
deepak bhardwaj writes "myself deepak . i have a problem with displaying output.i want to the output just like this 3 mths 6 mths 9 mths 1 yrGoogle Ad 8 6 3 0Yahoo Ad, 4 6 3 3Friend 3 45 3 1Print Ad 2 3 3 2here 3 mths etc. is the column name and 8,4,3,2 are the no of hits for perticuler add . plz give the solution. its urgent thanksdeepak"" |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-11-17 : 11:11:29
|
Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-17 : 11:33:35
|
[code]Select 'Google Ad' as Foo, 8 as [3 mths], 6 as [6 mths], 3 as [9 mths], 0 as [1 yr] union allSelect 'Yahoo Ad' as Foo, 4 as [3 mths], 6 as [6 mths], 3 as [9 mths], 3 as [1 yr] union allSelect 'Friend' as Foo, 3 as [3 mths], 45 as [6 mths], 3 as [9 mths], 1 as [1 yr] union allSelect 'Print Ad' as Foo, 2 as [3 mths], 3 as [6 mths], 3 as [9 mths], 2 as [1 yr][/code]Have fun!! Harsh AthalyeIndia."Nothing is Impossible" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-11-18 : 04:40:23
|
I think you need to read about Cross-tab Reports in sql server help fileMadhivananFailing to plan is Planning to fail |
|
|
|
|
|
|
|