Please help with report format
Hi,
When i am queryiing my table the result is like
select * from general;
MONTH REGISTERD ACCEPTED REJECTED
2012-04 120 80 40
2012-05 80 40 40
2012-05 60 40 20
2012-04 90 40 50
How i can display my result like below :
2012-04 2012-05
registered 210 170
accepted 120 80
rejected 90 60Thanks
Chandran.
Edited by: Chandran on Oct 3, 2012 9:02 AM
Hi,
Thanks for your reply Frank, I have tried your solution but but can't seem to find a way to make this work.
My base table data like :
select * from general;
ID TYPE MONTH REGISTERED ACCEPTED REJECTED
1 A 2012-04 50 40 10
2 B 2012-05 60 40 20
3 A 2012-04 70 40 30
4 C 2012-05 80 40 40
4 B 2012-04 90 40 50when i am applying the below query :
select
month,
sum(registered) Registered,
sum(accepted)Accepted,
sum(rejected)rejected from general group by month;
MONTH REGISTERED ACCEPTED REJECTED
2012-05 140 80 60
2012-04 210 120 90i should get the below format :
2012-04 2012-05
REGISTERED 210 140
ACCEPTED 120 80
REJECTED 90 60below are SQL commands :
CREATE TABLE GENERAL
( ID NUMBER,
TYPE VARCHAR2(20),
MONTH VARCHAR2(20),
REGISTERED NUMBER,
ACCEPTED NUMBER,
REJECTED NUMBER
insert into general values (1,'A','2012-04',50,40,10);
insert into general values (2,'B','2012-05',60,40,20);
insert into general values (3,'A','2012-04',70,40,30);
insert into general values (4,'C','2012-05',80,40,40);
insert into general values (5,'B','2012-04',90,40,50);Thanks
Chandran
Edited by: Chandran on Oct 4, 2012 9:55 AM
Edited by: Chandran on Oct 4, 2012 9:56 AM
Similar Messages
-
http://i18.tinypic.com/7ygz9k7.jpg
I have to make a report to come out like this from existing tables. I used the following sum and compute commands:
compute sum label '' of charge on patient_no
select patient.patient_no,item.charge,sum(charge) as TOTAL
The problem is i get this table:
http://i9.tinypic.com/80nmsdd.jpg
As can be seen it repeats the charges.
I know there must be an easy way or something. PLEASE HELP!i really appreciate the help i am getting here...here is my complete code and a screenshot of my result...how should i edit it to get my required result:
SET PAGESIZE 50;
SET LINESIZE 112;
COLUMN DATE_CHARGED NEW_VALUE DATE_CHARGEDVAR;
TTITLE LEFT 'DAILY REVENUE REPORT' RIGHT 'DATE: ' DATE_CHARGEDVAR SKIP 2;
COLUMN DATE_CHARGED NOPRINT;
BREAK ON PATIENT_NO NODUPLICATES ON PATIENT_NAME NODUPLICATES ON LOCATION NODUPLICATES ON FINANCIAL_SOURCE SKIP 1;
COMPUTE SUM LABEL '' OF TOTAL ON PATIENT_NO;
SELECT DISTINCT PATIENT.PATIENT_NO,LOCATION,PATIENT_NAME,FINANCIAL_SOURCE,COST_CENTER.COST_CENTER,ITEM.ITEM_CODE,
DATE_CHARGED,DESCRIPTION,CHARGE,SUM(CHARGE) AS TOTAL
FROM REPORT,PATIENT,HISTORY,ITEM,COST_CENTER
WHERE DATE_CHARGED='08-04-06'
AND PATIENT.PATIENT_NO=HISTORY.PATIENT_NO
AND PATIENT.PATIENT_NO=REPORT.PATIENT_NO
AND ITEM.ITEM_CODE=REPORT.ITEM_CODE
AND COST_CENTER.COST_CENTER=REPORT.COST_CENTER
GROUP BY PATIENT.PATIENT_NO,LOCATION,PATIENT_NAME,FINANCIAL_SOURCE,COST_CENTER.COST_CENTER,ITEM.ITEM_CODE,DATE_CHARGED,
DESCRIPTION,CHARGE;
The result of this table is this:
http://i4.tinypic.com/82iy9w8.jpg
How can i remove the duplicate values from the column total?
THe tables i am using here are ITEM (which has item_no, description, charge), HISTORY(location, financial_source), COST_CENTER(cost_center) and REPORT(date_charged).
ALl these tables have been used as can be seen in the code.
I hope this makes things much clear and i can get it sorted :) -
i have proubleam with string to date conversion, i out put date fromat is 2012-04-30T23:48:55.727-07:00 . so please help me the format conversion.
i wrote the method but it not workig
My method is
-(NSDate *)dateformstr:(NSString *)str
NSString *date = [str stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSDateFormatter *dateFormate = [[NSDateFormatter alloc] init];
[dateFormate setDateFormat:@"yyyy-MM-dd'T'HH:mm:sssZZZZ"]
// NSDate *formatterDate = [dateFormate dateFromString:str];
return formatterDate;
but i did not the value and if i try othere formate i is working but my requiremet format is 2012-04-30T23:48:55.727-07:00.
can any help it out in this senario.Sorry Butterbean, but I'm interested in the answer to your question myself.
I've spent a few hours transfering my library from one computer to another and then find out that my ratings didn't transfer. Like you, I've spent many hours rating my 2000+ songs. I'm sure you have more, nevertheless, I want to find out how to get those ratings. They still show in my iTunes on my laptop but, when I go to the iTunes folder and display the details of at song, no rating is there. If you find out how to get them to display there in the iTunes folder, it seems that would be the key.
Hope you get your answer soon. -
I forgot the code for my iPhone to access the Home screen I do , please help me
try formatting the iphone but when I put in nfc mode and connect it to the pc recognizes it and everything when you try to format the error 3004 appearsHello polo-angulo,
I apologize, I'm a bit unclear on the nature and scope of the issue you are describing. If you are saying that you are getting an error code (3004) when you try to restore your iPhone (because you could not remember your passcode), you may find the information and troubleshooting steps outlined in the following articles helpful:
Resolve iOS update and restore errors in iTunes - Apple Support
Get help with iOS update and restore errors - Apple Support
Sincerely,
- Brenden -
Please help with slideshow problems!
Am using Photoshop Elements 8 and trying to make a slideshow. Have tried 4 times now and keep ending up with same problem, cannot reopen project to continue edititing. Won't show up in orginizer and when I find on harddrive and try to open get message " wmv file cannot be opened". How can I save a
slideshow inprogress and be able to reopen and continue to edit and make slideshow? I want to thank anyone who can help me with this in advance as I
have gotten so frustrated that I want to just scream.
ThanksThanks for the help, thought I had done so but maybe not. Anyway will have another go at it, now may I ask another
question? I am trying to add audio to slideshow. I have some music I purchased thru amazon as mp3 files but I get
message no codec and when I try to add wmv I get same message. What type of file do I need and how can I add
multiple songs to one slideshow. I have one little wmv file that will go in, but it just replicates itself multiple times until
it fills slide show.
Thanks again, sorry to be a bother, but this thing is driving this old man crazy.
Date: Sun, 26 Dec 2010 20:34:32 -0700
From: [email protected]
To: [email protected]
Subject: Please help with slideshow problems!
You need to save the slideshow project in order to be able to go back later and make changes or additions to an existing slideshow . The wmv file is a final output format.
Now you are most probably using only the Output command: that is what makes the wmv file.
You should also do the Save Project command. (and I make it a practice to do the Save Project command before I do the Output command).
If you look at the Elements Organizer 8 Help, there is a topic on "Create a slide show".
-- Very close to the beginning of that topic is a screen shot of the Sldie Show Editor screen,
-- The bar below the usual menu bar is labeled with a "B" and called the Shortcuts bar.
-- The 1st entry on that Shortcuts bar is "Save Project"
It is the Save Project command that saves the information about which photos, audio, etc you placed in that specific slide show so that you can come back again to do subsequent editing. Save each Project with a unique name.
After completing the Save Project command, you shoud see an "icon" in the Organizer for that slide show.
Note: you must also keep the photo files and audio files which you have used in this slide show: you can't delete them because the project file does NOT contain a copy of the photos, it only has the identification and folder location of the photo and audio files.
> -
I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.
If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it. Also, try changing the password associated with the Apple ID that you were using for iMessage.
-
How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
Please help with proper steps, if any.Also see... these 2 Links...
Recovering your iTunes library from your iPod or iOS device
https://discussions.apple.com/docs/DOC-3991
Syncing to a New Computer...
https://discussions.apple.com/docs/DOC-3141 -
Please help with the message I am receving on startup ""You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported."
I have read some of the replies in the Apple Support Communities, but as I am no techie, I would have no idea how I would implement that solution.
Please help with what I need to type, how, where, etc.
Many thanks
AppleSueIn HunterCreekI am afraid there is no solution.
PowerPC refers to the processing chip used by Apple before they transferred to Intel chips. They are very different, and applications written only for PPC Macs cannot work on a Mac running Lion.
You could contact the developers to see if they have an updated version in the pipeline. -
Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.
Adobe - Lightroom : For Macintosh
Hal -
[ETL]Could you please help with a problem accessing UML stereotype attributes ?
Hi all,
Could you please help with a problem accessing UML stereotype attributes and their values ?
Here is the description :
-I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
-Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
-Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
-However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
Please help
Thank youHi Dimitris,
Thank you , a minimal example is provided now.
Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
Instructions for reproducing the problem :
1-Run the uml2etl.etl transformation with the supplied launch configuration.
2-Open lqn.model.
There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
Thank you
Mana -
Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs
Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
Thanks,
Hussein -
Please help me to format my laptop hp pavilion dv6 Windows 7 Home premium 64 bit?
Please help me to format my laptop hp pavilion dv6 Windows 7 Home premium 64 bit?
Hi,
There are Three main ways to restore your notebook to format your HDD and return the notebook to its 'Factory Condition' - see the document on the link below.
Performing An HP System Recovery - Windows 7.
Regards,
DP-K
****Click the White thumb to say thanks****
****Please mark Accept As Solution if it solves your problem****
****I don't work for HP****
Microsoft MVP - Windows Experience -
Welcome.
At the outset, I'm sorry for my English
Please help with configuration Photoshop CS6 appearance.
How to disable the background of the program so you can see the desktop. (same menus and tools)
i wantto be the same effect as CS5.Please try turning off
Window > Application Frame -
cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?
If you mean updae server
Update Server
Try:
- Powering off and then back on your router.
- iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
- Change the DNS to either Google's or Open DNS servers
Public DNS — Google Developers
OpenDNS IP Addresses
- For one user uninstalling/reinstalling iTunes resolved the problem
- Try on another computer/network
- Wait if it is an Apple problem
Otherwise what server are you talking about -
Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work
You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
Regards.
Maybe you are looking for
-
I wish to display my current bookmarks as my opening home page in Firefox. I do not wish to use the Bookmarks sidebar instead. It used to work to open with bookmarks.html, which was and still is stored in my Firefox profile. However, I understand thi
-
Disk Utility: No Mac Drive in Internal HDD. Can't format or erase.
Hey guys, I just got my new mac mini and I installed a Samsung pro 840 SSD. The thing is I messed up. I turned my mac on and everything went fine, Disk Utility showed up telling me that the drive was "unreadable". I decided to turn the thing off and
-
Replaced hard drive; now Macbook wont boot from CD (or USB for that matter)
Looking for a genius. I've tried holding down "C" during startup until the option to boot from CD shows up, but my install disk spins, then stops. Does this about 3 times and the Macbook spits it out (I held "C" the entire time). I've also tried hold
-
I was having problems with a "flash plug in errors" on safari and followed instructions to uninstall the adobe flash. This worked well and I stopped getting the error messages on safari, but now when I attempt to open other applications (pages, numb
-
Hi, I have an iphone 3G and I've just been inspecting around the phone and have noticed that the actual LCD is not aligned to the centre of the phone. I figured this because the display on one side is directly on the line of the black glass while on