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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

column data grouped to create new query columns? 1

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
That has to be one of the worst subjects for a question!

Ok here is a look at the data....

Period Office Service Feature CountOfID
200206 CHI Switched LD LD Dir 1
200206 CHI Switched LD LD Interstate 65
200206 CHI Switched LD LD IntraLATA 245
200206 CHI Switched LD LD Intrastate 359
200206 CHI Switched LD LD US to Inter 8
200206 CHI Switched LD LD Caribbean 3
200206 WAS LMS Business Local (LMS) 3060
200206 WAS DID/DOD Trunk Local Dir 8
200206 WAS Dedicated LD LD Canada 129
200206 WAS Dedicated LD LD Dir 3
200206 HOU Toll-Free LD IntraLATA 203
200206 HOU Toll-Free LD Interstate 608
200206 HOU Toll-Free LD Inter to US 55
200206 HOU Dedicated LD LD US to Inter 25
200206 HOU Dedicated LD LD Mexico 8
200206 HOU Dedicated LD LD IntraLATA 265
200206 HOU Dedicated LD LD Directory 17
200206 HOU Dedicated LD LD Canada 182
200206 HOU Calling Card LD Intrastate 1
200206 HOU Calling Card LD Interstate 5
200206 HOU Switched LD LD Interstate 635
200206 HOU Switched LD LD IntraLATA 778
200206 HOU Dedicated LD LD Intrastate 4905
200206 HOU Switched LD LD Intrastate 156
200206 ALA Switched LD LD Canada 3
200206 ALA Switched LD LD Caribbean 27
200206 ALA Switched LD LD Interstate 237
200206 ALA Switched LD LD IntraLATA 10
200206 ALA Switched LD LD Intrastate 346
200206 BOS Switched LD LD Canada 9
200206 BOS Switched LD LD Intrastate 730
200206 BOS Switched LD LD IntraLATA 402
200206 BOS Switched LD LD Interstate 201
200206 FLA Switched LD LD Interstate 91
200206 JUN Dedicated LD LD Mexico 1
200206 JUN DID/DOD Trunk Local (LMS) 11111
200206 JUN Toll-Free LD Interstate 18
200206 JUN Dedicated LD LD Intrastate 277
200206 JUN Dedicated LD LD IntraLATA 1710
200206 JUN Dedicated LD LD Interstate 2830


As you can see, this shows for a date (parameter pulled, not important here) It has the office abbrev., the service type of call, feature type of that service used, and the amount placed ( by that office in that month).

Here is the thing. This is from a query. What I need is to show something that would group the feature type into its own columns so I could report on what is known as the usage type.

one group would be local. This would just be for any Local (LMS) calls. Another group would be Directory Assistance. This would be for all Local Dir and LD Dir calls. Also, International - LD Mexico, LD Carribean, LD US to International, and LD Canada Calls.

data would look like

Local calls | Directory Calls | International Calls
SumLocal SumDir Sum Inter


Is this enough info? Too much? Let me know!!! Thanks

misscrf

Management is doing things right, leadership is doing the right things
 
Do you have a table that lists:

Code:
Local Calls           Local (LMS)
Directory Assistance  Local Dir
Directory Assistance  LD Dir
International         LD Mexico
International         LD Carribean
International         LD US to International
International         LD Cananda Calls

Leslie
 
no, this is a self create grouping... is that what I need to do?.... wow you're making me think on a Friday!

misscrf

Management is doing things right, leadership is doing the right things
 
If you have a table like this one you would be able to join into it on the description (LD Dir) and group by the type (Directory Assistance)

Sorry, didn't mean for you to have to think, I was trying to do it for you!!!

HTH

Leslie
 
Yeah, thanks... I did that and got my chart set in 2 seconds. I don't know why the obvious never occurs to me. Im always so sure Im gonna need this elaborate query with sql and coding and ahhhhhhhh.......

anyway, thanks!


misscrf

Management is doing things right, leadership is doing the right things
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top