mainrotor
asked on
I need help building Pivot tables and cross tab queries in SQL
Hi Experts,
Is there a way to dynamically build cross tab queries and pivot tables in SQL? If I build an application that will allow the user to select up to 3 fields, could this be done?
Thanks in advance,
mrotor
Is there a way to dynamically build cross tab queries and pivot tables in SQL? If I build an application that will allow the user to select up to 3 fields, could this be done?
Thanks in advance,
mrotor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can go totally dynamic with dynamic sql....
or you could go partially dynamic if you have selection criteria that
allow for it...
what are you allowing the users to select ....
the pivoted columns (range)?
or the columns against which the data is to be displayed?
can you handle the naming of the columns on the returned result set?
or you could go partially dynamic if you have selection criteria that
allow for it...
what are you allowing the users to select ....
the pivoted columns (range)?
or the columns against which the data is to be displayed?
can you handle the naming of the columns on the returned result set?
ASKER
Lowfatspread, I am allowing the users to select the columns.
ASKER
Lowfatspread,
I am allowing the users to select the columns against which the data is to be displayed.
I am allowing the users to select the columns against which the data is to be displayed.
http://blog.sqlauthority.c
http://blog.sqlauthority.c