Help me with the syntax
This basic select will give me will count each occurence of origin. What would the syntax be if I wanted the SQL to return how many different origins there are (not how many each occurs)?
select origin, count(*) from voucher group by origin
Thanks all!!
SQL> select deptno from emp;
DEPTNO
20
30
30
20
30
30
10
20
10
30
20
30
20
10
14 rows selected.
SQL> select distinct deptno from emp;
DEPTNO
10
20
30
SQL> select count (distinct deptno) from emp;
COUNT(DISTINCTDEPTNO)
3
Similar Messages
-
Having trouble with the syntax when trying to only print some random pages from a multi page documen
Having trouble with the syntax when trying to only print some random pages from a multi page document. So far in the Print Selection Area, I have chosen "pages" and then typed 1,3-4 so as NOT to print page 2 but this does not seem to work. - Help Please
In my updated firefox, the print button does NOT open print preview first.
How can I access print preview function? -
Hello, we have both Creative Cloud membership and Creative Cloud for team. Can you help me with the difference and if i need to have both? We have 9 employees that are using it. Just not sure if i'm paying for something i don't need.
Thank youPlease refer to Creative Cloud Help | Creative Cloud / Common Questions
CC is for retail use with 20 GB of storage space, CCT is where number of seats are purchased & assigned by one program admin where each seat gets 100GB of storage space.
You can not have both the CC & team in one account as it will only provide you added storage space of 120 GB but you can activate the CC any of them or either of them twice as CC is based on Adobe ID.
Regards
Rajshree -
Please help me with the iphone 4 trouble
I'm using iphone4 and i saw a new update IOS7 and i press to update,the iphone is updating than it turn off for 5 minutes later it turn on again but with the app's logo and it start to repeat again and again and I can not connect to itunes to fix,I do not know what to do ,hope you guys will help me with the iphone,i reallly need it right now
Make sure you have the Latest Version of iTunes (v11) Installed on your computer
iTunes free download from www.itunes.com/download
Christine Hua wrote:
the iphone is updating than it turn off for 5 minutes later it turn on again but with the app's logo and it start to repeat again and again and I can not connect to itunes to fix,
See Here > http://support.apple.com/kb/HT1808
You may need to try this More than Once...
Be sure to Follow ALL the Steps...
But... if the Device has been Modified... this will Not necessarily work.
Unauthorized modification of iOS > http://support.apple.com/kb/HT3743 -
Please help me with the installation process.
i have got free norton antivirus activation keybwith the pirchase of hp 16 gb pendrive .
please help me with the installation process.Hey @10p,
Welcome to the HP Support Forums!
I understand that you need assistance with the installation of Norton Antivirus that you received with the purchase of an HP 16gb Pendrive. Did you get the Pendrive with a computer or just purchase the Pendrive on its own?
Once I know if the Pendrive came with the purchase of a computer I will be able to point you in the right direction for support. Good luck!
X-23
I work on behalf of HP
Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping! -
Please help me with the homework given to me by my teacher
hello,i am new in java programming please help me with the home work given to me by my teacher at school, help me to build an interface that can work with this code.i can build an interface but i dont just understand this code.
//references:
//http://forums.techguy.org/development/570048-need-write-java-program-convert.html
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileReader;
public class Translate
public static void main(String [] args) throws IOException
if (args.length != 2)
System.err.println("usage: Translate wordmapfile textfile");
System.exit(1);
try
HashMap words = ReadHashMapFromFile(args[0]);
System.out.println(ProcessFile(words, args[1]));
catch (Exception e)
e.printStackTrace();
// static helper methods
* Reads a file into a HashMap. The file should contain lines of the format
* "key\tvalue\n"
* @returns a hashmap of the given file
@SuppressWarnings("unchecked")
private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
BufferedReader in = null;
HashMap map = null;
try
in = new BufferedReader(new FileReader(filename));
String line;
map = new HashMap();
while ((line = in.readLine()) != null)
String[] fields = line.split("\\t", 2);
if (fields.length != 2) continue; //just ignore "invalid" lines
map.put(fields[0], fields[1]);
finally
if(in!=null) in.close(); //may throw IOException
return(map); //returning a reference to local variable is safe in java (unlike C/C++)
* Process the given file
* @returns String contains the whole file.
private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException {
BufferedReader in = null;
StringBuffer out = null;
try {
in = new BufferedReader(new FileReader(filename));
out = new StringBuffer();
String line = null;
while( (line=in.readLine()) != null ) {
out.append(SearchAndReplaceWordsInText(words, line)+"\n");
} finally {
if(in!=null) in.close(); //may throw IOException
return out.toString();
* Replaces all occurrences in text of each key in words with it's value.
* @returns String
private static String SearchAndReplaceWordsInText(Map words, String text) {
Iterator it = words.keySet().iterator();
while( it.hasNext() ) {
String key = (String)it.next();
text = text.replaceAll("\\b"+key+"\\b", (String)words.get(key));
return text;
* @returns: s with the first letter capitalized
String capitalize(String s)
return s.substring(0,0).toUpperCase() + s.substring(1);
}... here's the head of my pirate_words_map.txt
hello ahoy
hi yo-ho-ho
pardon me avast
excuse me arrr
yes aye
my me
friend me bucko
sir matey
madam proud beauty
miss comely wench
stranger scurvy dog
officer foul blaggart
where whar
is be
are be
am be
the th'
you ye
your yer
tell be tellin'Heres your answer. Run it in on your pc.
public class Annoy
public static void main(String[] args)
System.out.println("I am a triple poster.");
System.out.println("I can not understand why I can not understand the help I have receved to date on the java forums.");
} -
Please help me with the digital signature validation problem?
Please help me with the digital signature validation problem?
Hi
Execute the program in the Debuggin mode.
In the Debugger Window
Select Breakpoint -> Break point at -> Breakpoint at source code Menu Item and enter the details of the program/include/line no..
Activate the System Debugger On from the Settings Menu.
Hope this would help you.
Murthy
Edited by: Kalyanam Seetha Rama Murthy on Jul 18, 2008 7:20 AM -
Please help me with the accounting records of iTunes. At step in placing credit card details are asked to contact iTunes Support
Brenda, the easiest way to contact the support team is thru the iTunes Customer Service website:
http://www.apple.com/support/itunes/contact/ -
Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it without formatting windows 8.Please email the steps , Thanks
Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it without formatting windows 8.Please email the steps , Thanks
Assuming your rig can support virtual machines, you can use Hyper-V and run another OS there.
Better practice however is to use a dedicated machine and use remote desktop to the server.
Corsair Carbide 300R with window
Corsair TX850V2 70A@12V
Asus M5A99FX PRO R2.0 CFX/SLI
AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
G.SKILL RipjawsX DDR3-2133 8 GB
EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
Asus PA238QR IPS LED HDMI DP 1080p
ST2000DM001 & Windows 8.1 Enterprise x64
Microsoft Wireless Desktop 2000
Wacom Bamboo CHT470M
Place your rig specifics into your signature like I have, makes it 100x easier to understand!
Hardcore Games Legendary is the Only Way to Play! -
Could you please help me with the problem. I have macbook with retina with mac os 10.7.4 ann want to update it to mac os 10.7.5. I had been waiting for 2 hours to do it and had tried 3 times but it appeared that it was impossible. What should I do?
You can download the standalone updates:
OS X Lion Update 10.7.5 (Client Combo)
OS X Lion 10.7.5 Supplemental Update -
Hey,I've got a problem on my iPad mini for a few days now?My iPad is in recovery mode at the moment and I Cannot restore my Ipad with iTunes...Can anyone help me with the solution?Each of your helps will be appreciate...Thanks for all the helps...
Follow step 1 to 6 closely to recover your iPad.
http://support.apple.com/kb/HT1808
Note: You may have to repeat the above a few times -
Dear all
How to Setup Forward Error Handling in PI Scenarios. Can you help me with the same with screen shots if possible?
Thanks
Regards
karanHello
These are the following errors
1. Trace level="1" type="T">no interface action for sender or receiver found</Trace>
2. <Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!
3.
<Trace level="1" type="T">Application Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="T">System Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
<Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!</
Trace level="3" type="T">No persisting of message after plsrv call, because of config</Trace>Trace level="3" type="T">Error of the prevous version:</TraceTrace level="3" type="T">Error ID APPLICATION_ERROR</Trace>
tThere are repeating errors also.
TThanks
Regards
kkaran -
Pls help me with the issue(pls )
Hi Experts!
Please help me with the issue.
I need to transfer data from .net system to sap system for
a customised tcode.
The whole process Should be automated .
I researched on this topic, and it seems ALE IDOC ,BAPI OR RFC can be used.
But i really dnt know how to move forward with this issue.
Regards
JayaHi,
Thanks for the reply.
The problem is That i m going to do ale idoc for the first time and moreover I need to upload the excel file using customised tcode zcs15.
The screen of zcs15 consists of 2 fields.
One is for the name and other one is for uploading excel file.
Can u pls guide me.
Will reward u for sure.
Regards
Jaya -
Hi, I'm trying to download applications, but after I enter my ID password it's giving me window - cannot open iTunes? Please could you help me with the solution
What did you have to do? I am having the same window come up and I read all of the support trouble shooting. Still won't work.
I need help please. -
I RECIVED AN EMAIL FROM ADOBE AS : As good will gesture, we can help you with the upgrade for PSE 13. We would request you to place the order for Adobe Photoshop Elements 13 as an upgrade and then we will provide you the full version serial number for the same product against the new upgrade order" IS THIS UPGRADE FREE AND WHAT SHOULD I DO, HOW CAN I HAVE THIS UPGRADE?
Compare with on-line stores. The full version is often cheaper than Adobe's upgrade price.
See this example from Amazon, but check pricing in your own region.
http://www.amazon.com/gp/product/B00N4OLCRO/ref=s9_simh_gw_p65_d4_i2?pf_rd_m=ATVPDKIKX0DER &pf_rd_s=desktop-1&pf_rd_r=0F1GED9546928YP3PHC0&pf_rd_t=36701&pf_rd_p=1970559082&pf_rd_i=d esktop
Maybe you are looking for
-
Mail app setup issues... incoming server can't be set
Upgraded to Lion last evening and the OSX Mail app hasn't been able to download mail from my me.com account since. The alert icon is displayed and the message states: "Alert: There may be a problem with the mail server or network. Verify the account
-
Hello, I have an unusual question. Adobe's video tutorials are always brilliantly made and very helpful. My question is, do you make the videos internally or do you outsource them? If you outsource, can you please name the agency? We are looking for
-
BIGINT aggregation issue in Hana rev 91
Hi, I have a BIGINT value field that isn't aggregating beyond 2147483648 (the max INTEGER value). I'm seeing results as follows: Period Value 5 320,272,401 6 635,021,492 7 515,993,660 8 546,668,931 9 702,138,445 10 438,782,780 11 459,387,988 12 722,4
-
Workflow 50000042- PCRs in MSS
Hi All, We have some PCRs like Change in PA/PSA workflow used is 500000042. But i am not understanding to whom mail will go and where to set in config that mail should go to Line manager and HR. Please its very urgent.... Thanks
-
Not supported: Cannot obtain an error message from the server on Win7
App is written against the RDC and runs fine on Xp, but on Win7 it fails when I change databases. Ie you can select from several databases from within the app. When doing so the app closes the RDC connection: if (m_Application != NULL) m_Applica