SQL ExcelSQL Excel

Freeware Excel Add-In - Simplify data retrieval from SQL Server, Oracle, Sybase, MySQL, DB2, Firebird and any other ODBC compliant database

SQL Excel Support
Welcome, Guest
Please Login or Register.    Lost Password?
Please let us know how we can improve the add-in.
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Pivoting/Crosstab
#282
WotC (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Pivoting/Crosstab 3 Months, 3 Weeks ago Karma: 0  
Hi!

First of all thanks for this great add-in. really useful, pretty fast.

i have a question though. after starting a query i get a list of my results. is it possible using this add-in to pivot/crosstab this result? To clarify: The output is like follows (three columns):

col1 col2 col3
AAAA aaaa 27
AAAA bbbb 12
AAAA cccc 47
AAAA dddd 55
AAAA eeee 32
BBBB aaaa 12
BBBB cccc 22
BBBB dddd 34
...
CCCC aaaa 11
...
DDDD aaaa 33
....
EEEE aaaa 23

The desired Excel format/output would be (excel column "A" would be the results from col1 from the example above, column "B" would contain the results from col3, "grouped" by the label of col2):

1 | A | aaaa | bbbb | cccc | dddd |
--|-------|------|------|------|------|
2 | AAAA | 27 | 12 | 47 | |
3 | BBBB | 12 | - | 22 | |
4 | CCCC | 11 | | | |
5 | DDDD | 33 | | | |
6 | EEEE | 23 | | | |

I hope everything is clear ?
I think there is a feature like that on SQL server 2005 called "pivot"- unfortunately i'm still running 2000 and can't upgrade . Any suggestions?

Thanks in advance
Harald
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/09/11 04:39 By WotC.
  The administrator has disabled public write access.
#284
admin (Admin)
Admin
Posts: 175
graph
User Online Now Click here to see the profile of this user
Re:Pivoting/Crosstab 3 Months, 3 Weeks ago Karma: 1  
Hi!

Thanks alot for signing up on the site.

Sorry but that is not possible at the moment with the addin. The addin is moving in this direction but at the moment and for the next while all you can do is use the available SQL commands for the database system you are using.

All I can suggest at this point is that you write a routine in VBA to process the imported data. Or you could upgrade to SQL 2005 like you say...

Sorry for that. Please feel free to post up other feedback if you think of something as it is very helpful to keep the addin moving forward. Some things are easier to implement than others..

Thanks again and have a nice evening. Al
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Thanks for using the forum SQL Excel Freeware Add-inget the latest posts directly to your desktop

Google Translate

Copyright SQL Excel, 2007-2008 | valid xhtml? | valid CSS? |Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation