SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 problem with output the result
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 11/17/2006 :  10:24:04  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
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 yr

Google Ad 8 6 3 0

Yahoo Ad, 4 6 3 3

Friend 3 45 3 1

Print Ad 2 3 3 2



here 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
thanks
deepak""

snSQL
Flowing Fount of Yak Knowledge

USA
1837 Posts

Posted - 11/17/2006 :  11:11:29  Show Profile  Reply with Quote
Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

harsh_athalye
Flowing Fount of Yak Knowledge

India
5581 Posts

Posted - 11/17/2006 :  11:33:35  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote
Select 'Google Ad' as Foo, 8 as [3 mths], 6 as [6 mths], 3 as [9 mths], 0 as [1 yr] union all
Select 'Yahoo Ad' as Foo, 4 as [3 mths], 6 as [6 mths], 3 as [9 mths], 3 as [1 yr] union all
Select 'Friend' as Foo, 3 as [3 mths], 45 as [6 mths], 3 as [9 mths], 1 as [1 yr] union all
Select 'Print Ad' as Foo, 2 as [3 mths], 3 as [6 mths], 3 as [9 mths], 2 as [1 yr]


Have fun!!

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22761 Posts

Posted - 11/18/2006 :  04:40:23  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
I think you need to read about Cross-tab Reports in sql server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000