Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtotal Results in columns instead of rows

Status
Not open for further replies.

smatthews

IS-IT--Management
Jul 27, 2001
108
US
I am trying to get a total of member codes in columns instead of rows. Is there an easy way to do this?

I have a region code and a member code and instead of this:

Region MbrCode Total

SW NATL 100
SW INTL 50
NE NATL 150
NE INTL 25
NE COMP 10

I would like to get this:
Region NATL INTL COMP
SW 100 50 0
NE 150 25 10

Any suggestions as to be best way to go about this without creating a new table.

Thanks,smatthews
 
faq183-5278 and faq183-5269.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top