How can i get a query to count a number of strings?

I want the query to count for me how many holidays there are to the USA in my table. But im not sure how to get it to retreive the result of a string or varchar2 datatype. This is what i have tried so far.
select count(COUNTRYVIS) <<this column contains all the countries visited
from "IT220_HOLIDAYDETAILS" <<this is the table where the column is
where COUNTRYVIS = "USA" << this is the result i want it to count
ORA-00904: "USA": invalid identifier <<this is the error message im getting, is there a way to count strings?
Thanks in advance!

This has nothing to do with APEX. Please post basic SQL questions on the +{forum:id=75}+ forum.
In any OTN forum, alll code should be posted wrapped in <tt>\...\</tt> tags as described in the FAQ:
select count(COUNTRYVIS) -- this column contains all the countries visited
from "IT220_HOLIDAYDETAILS" -- this is the table where the column is
where COUNTRYVIS = "USA" -- this is the result i want it to countYou appear to be struggling with the distinction between identifiers and text literals. Hint: One uses double quotes, the other single quotes.
Note that quoted identifiers are generally not a good idea.

Similar Messages

  • How can I get a query in the search field to open in a new tab or new window from the current window?

    How can I get a query in the search field to open in a new tab or new window from the current window?

    If you are searching via the Search Bar on the Navigation Toolbar, this preference can be changed to have searches there open in a Tab.
    Type '''about:config''' in the Address Bar and hit Enter. Then answer "I'll be careful". Type this pref in the Search at the top.
    '''browser.search.openintab''' = double-click to toggle to '''true'''

  • How can I get the query name in webitem method ?

    Hello,
    I have defined a new web item but I can't retrieved parameter of my webitem in the RENDER method for instance. I have declared a parameter in the RSRRENDERATR table like this :
    REN_NAME : MY_WEBITEM
    ATR_NAME : MY_PARAM
    ATR TYP : TEXT
    CHR MAX LEN : 50
    How can I do this ? How can I get the MY_PARAM value in the RENDER method ?
    Thanks a lot
    GC.
    Edited by: CoGr on Feb 11, 2008 12:10 PM

    Hi ,
    data l_r_view type ref cl_rsr_www_view.
    data l_t_text_symbols type rrx1_t_txt_symbols.
    l_r_view =? n_r_data_provider.
    CALL METHOD L_R_VIEW->n_r_request->TEXT_ELEMENTS_GET
      IMPORTING
        E_T_TXT_ELEMENTS = l_t_text_symbols.
    l_t_text_symbols contains all DP information like Query technical name, or Report text last load etc.
    best regards,
    kai

  • How can I get SQL query excution time

    Hi ,
    When I run a query , How can i get total execution time for that query.
    Thanks,
    Regards,
    Basha.

    There are several ways:
    1. In SQL, issue SET TIMING ON
    2. Trace your query:
    - ALTER SESSION SQL_TRACE=TRUE;
    - Execute your query
    - ALTER SESSION SET SQL_TRACE=FALSE
    - Decode the tracefile left at USER_DUMP_DEST using TKPROF.

  • How can I get the query name/aggregationslevel in my planning function?

    Hi,
    is it possiable to get the query name/aggregationslevel in a planning fuction?
    thanks for your idea.
    hongwei

    Hi,
    The interface IF_RSPLFA_INFOPROV_DESC
    provides methods for retrieving the most important properties of an InfoProvider from the point of view of the implementation class of a planning function type.
    Methods GET_T_CHARNM and GET_T_KEYFNM return the names of the characteristics and key figures in the InfoProvider.
    You can get the properties of the InfoObjects and compound information by calling method GET_TAB_IOBJ_PRO and GET_TAB_IOBJ_CMP .
    Does this help?
    Best Regards
    Shyam

  • How can I get a total page count of a PDF before placing every page in the PDF?

    Before the [long] spiel, I'm using javascript in InDesign CS3.
    I'd like to create a script that places a multiPage PDF in any number of different impositions. (saddle stitch, 4up signatures, 16up signatures etc.)
    I've easily created a script that iterates through a PDF and places it into a new document as (4,1|2,3), (8,5|6,7) etc, which works for printing in duplex, folding each page in half, and gluing the resulting spines to make a simple thick book (for PDFs with more than, say, 64 pages).
    However, the next step is to re-write the script to create a saddle stitch document (16,1|2,15), (14,3|4,13) ... (10,7|8,9). For this I need to know how many pages there are in the PDF before I start placing the PDF pages, and then making the new document [int((PDFpages+3)/4)] pages long.
    Is there a simple way to get the count of PDFpages without going through a loop and placing the next page from the PDF until the placed page number equals the first page number?
    This way seems wasteful:
    var totPDFPages = 1;
    app.pdfPlacePreferences.pageNumber = totPDFPages;
    myPDFPage = sheetFront.place(File(srcPDF), [0,0])[0];
    var pdfFirstPage = myPDFPage.pdfAttributes.pageNumber;
    while (doneCounting == false) {
    totPDFPages += 1;app.pdfPlacePreferences.pageNumber = totPDFPages;
    myPDFPage = sheetFront.place(File(srcPDF), [0,0])[0];
    if (myPDFPage.pdfAttributes.pageNumber == pdfFirstPage) {
    totPDFPages -=1;
    doneCounting = true;
    alert("PDF has " + totPDFPages + " pages!");exit();
    myPDFPage.remove();
    NB. Javascript above *hasn't* been run, but should look similar once debugged.
    The only thing I've though of to relieve the sheer duplication of placing the PDF twice (once for the count, and once for the imposition), is to create an array of impoPages[counter]=myPDFPage, and then shuffle the pages referenced by the array to the correct sheet and position.
    It'd be much easier to be able to assign pageCount = File(srcPDF).pageCount !!!
    Thanks for any help/tips or even a simple "What are you smoking, man!?"
    Cheers,
    Jezz

    this will get almost all pdf pages count.
    jxswm
    function getPDFPageCount(f){
      if(f.alias){f = f.resolve();}
      if(f == null){return -1;}
      if(f.hidden){f.hidden = false;}
      if(f.readonly){f.readonly = false;}
      f = new File(f.fsName);
      f.encoding = "Binary";
      if(!f.open("r","TEXT","R*ch")){return -1;}
      f.seek(0, 0); var str = f.read(); f.close();
      if(!str){return -1;}
      //f = new File(Folder.temp+"/123.TXT");
      //writeFile(f, str.toSource()); f.execute();
      var ix, _ix, lim, ps;
      ix = str.indexOf("/N ");
      if(ix == -1){
        var src = str.toSource();
        _ix = src.indexOf("<< /Type /Pages /Kids [");
        if(_ix == -1){
          ps = src.match(/<<\/Count (\d+)\/Type\/Pages\/Kids\[/);
          if(ps == null){
            ps = src.match(/obj <<\\n\/Type \/Pages\\n\/Count (\d+)\\n\/Kids \[/);
            if(ps == null){
              ps = src.match(/obj\\n<<\\n\/Type \/Pages\\n\/Kids \[.+\]\\n\/Count (\d+)\\n\//);
              if(ps == null){return -1;}
              lim = parseInt(ps[1]);
              if(isNaN(lim)){return -1;}
              return lim;
            lim = parseInt(ps[1]);
            if(isNaN(lim)){return -1;}
            return lim;
          lim = parseInt(ps[1]);
          if(isNaN(lim)){return -1;}
          return lim;
        ix = src.indexOf("] /Count ", _ix);
        if(ix == -1){return -1;}
        _ix = src.indexOf(">>", ix);
        if(_ix == -1){return -1;}
        lim = parseInt(src.substring(ix+9, _ix));
        if(isNaN(lim)){return -1;}
        return lim;
      _ix = str.indexOf("/T", ix);
      if(_ix == -1){
        ps = str.match(/<<\/Count (\d+)\/Type\/Pages\/Kids\[/);
        if(ps == null){return -1;}
        lim = parseInt(ps[1]);
        if(isNaN(lim)){return -1;}
        return lim;
      lim = parseInt(str.substring(ix+3, _ix));
      if(isNaN(lim)){return -1;}
      return lim;

  • How can I get this query to work?

    HI
    SELECT  TOP 200  [word] ,COUNT(word) AS count
              FROM [COMMENT_WORDS]
              where word NOT in (SELECT wordText FROM word)
                GROUP BY word
                ORDER BY COUNT desc
    gives me this error:
    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    please help

    Thanks I changed the count name but I am still getting
    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    I also went into the word database and ran
        ALTER DATABASE [word] COLLATE
        Latin1_General_CI_AS
    and now both databases have the same colaltion but I still get the error:
    Msg 468, Level 16, State 9, Line 1
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    I am using ms sql 2005

  • How can I get iMessage to recognize my phone number AND my email address?

    I used to get imessages using my phone number.  Then my iphone screen broke and I ended up buying a new one.  Now when I restored my iphone, the imessaging only recognizes my email address (the one connected to my apple id) and not the phone number.  The phone number shows up as a lighter type font and can not be selected.  I made sure this number is part of my apple ID but that did not help. I have deleted and restored the account twice. 
    The imessage is working but only using the email address.
    Ideas?
    Jennifer

    the link Ckuan put up helped me resolve this. thank you.
    i signed out of both imessage and facetime on my computer and iphone. (i actually wasnt signed into my account on my iphone)
    but i did sign in on my iphone
    i then made sure that my tel number was the only button ticked
    then once that was sorted i went back to my computer and signed in to both imessage and facetime and my number was now an option.
    i made sure it was ticked and all was ok.
    i think my problem occured from when i done a "reset all settings" ... i only done this reset because my keypad on my iphone was sticking and that was a solution to sorting that.
    thanks again

  • How can I get it to accept my serial number?

    I installed the wrong disk yesterday giving my serial number. I uninstalled the wrong disk. Now I am trying to install the correct disk but it is saying my serial number is not a serial number.

    Sounds like Elements. you may wanna (re-)read this stuff:
    Install Premiere Elements, Photoshop Elements
    For everything else some more info would indeed be required.
    Mylenium

  • [SQL] how can i get this result....??(accumulation distinct count)

    [SQL] how can i get this result....??(accumulation distinct count)
    Hi everybody,
    pls tell me how can it possible to get result?
    ### sample data
    date visitor
    10-01 A
    10-01 A
    10-01 B
    10-01 B
    10-01 C
    10-01 C
    10-02 A
    10-02 C
    10-02 C
    10-02 D
    10-02 D
    10-03 B
    10-03 B
    10-03 B
    10-03 A
    10-03 A
    10-03 F
    10-04 A
    10-04 A
    10-04 F
    result that i want...like this.
    date date_unqiue_visitors acc_date_unique_visitors
    10-01 3 3
    10-02 3 4
    10-03 3 5
    10-04 2 5
    date distinct visitors : count(distinct visitor)
    but how can i get accumulation distinct visitor count???
    Thanks to every body..

    SQL> select dt,cnt,sum(cnt1) over(order by dt) cnt1
      2  from(
      3  select dt,count(distinct visitor) cnt,sum(flg) cnt1
      4  from
      5   (select dt,visitor,(select decode(count(*),0,1,0)
      6                           from test
      7                           where rowid < t.rowid
      8                           and visitor = t.visitor) flg
      9   from test t)
    10  group by dt);
    DT                CNT       CNT1
    10-01               3          3
    10-02               3          4
    10-03               3          5
    10-04               2          5
    Message was edited by:
            jeneesh
    Wrong...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • HT4098 How can I get my money back from app store when I did not renew my app

    I didn't not renew the app that I never really use and now the apple store charge me from my card. How can I get my money back and what number I should call because I totally lost at apple store and don't know what to do. This is really frustrated that apple have this kind of customer service... could someone help?

    These are user-to-user forums, they are not monitored by Apple (there are too many forums/threads/messages for that to happen).
    If the apps aren't working as described in the store then you could the report a problem link from your purchase history : http://support.apple.com/kb/HT1933

  • HT203254 I bought my MacBook Pro since 2008. Now I live in Thailand, and my MacBook had the second symptom (No video on the computer screen (or external display) even though the computer is on). How can I get guarantee in Bangkok?

    I bought my MacBook Pro since 2008. Now I live in Thailand, and my MacBook had the second symptom (No video on the computer screen (or external display) even though the computer is on). How can I get guarantee in Bangkok?
    <Serial Number Edited by Host>

    "That's why I'm wondering whether they still can fix it as lifetime guaranty or not?"
    No, not lifetime.
    According to the referencd article:
    "If the NVIDIA graphics processor in your MacBook Pro has failed, or fails within four years of the original date of purchase, a repair will be done free of charge, even if your MacBook Pro is out of warranty."

  • How can I get record count with a query?

    In Client/Server pplication,the client send a query to server.
    How can server get record count by oracle call interface?
    Is it need execute "select count(*) from ...."?

    Yes.
    Either that or increment a counter for each record fetched and
    loop round until you hit the last record.
    The first method would be more efficient on large datasets.

  • How can i get the count vaule from GPIB?

    I want to get the count waule from GPIB ,but I find that the vaule I get from GPIB now is the trace vaule ,
    so I ask How can i get it.

    The count of what? What kind of instrument are you using?

  • How can I get the elapse time for execution of a Query for a session

    Hi ,
    How can I get the elapse time for execution of a Query for a session?
    Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
    Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
    Thanks in advance.

    Hi
    You can use the dbms_utility.get_time tool (gives binary_integer type value).
    1/ Initialize you time and date of beginning :
    v_beginTime := dbms_utility.get_time ;
    2/ Run you procedure...
    3/ Get end-time with :
    v_endTime := dbms_utility.get_time ;
    4/ Thus, calculate elapsed time by difference :
    v_elapsTime := v_endTime - v_beginTime ;
    This will give you time elapsed in of 100th of seconds...
    Then you can format you result to give correct print time.
    Hope it will help you.
    AL

Maybe you are looking for

  • KT3-ULTRA - Win XP won\'t install

    I wonder if anyone can help... My computer specs are here: KT3 Ultra-ARU XP 2000+ (not over clocked) 256MB DDR Ram IDE0 - HDD1 Maxtor 40gb IDE0 - HDD2 Maxtor 20gb IDE1 - CD IDE1 - CDRW GeForce 256 (AGP) SBLive! Linksys Netgear 10/100 Mbps Network Car

  • Photoshop Elements Tags

    I am presently using Photoshop Elements 8. If I upgrade to Photoshop Elements 12 will I lose my Photoshop Elements 8 photo tags?

  • Attempting to move iPhoto to external HD.

    I get an error stating 'file already exists with that name'  Threre are no other files on the HD?  Help!

  • Cannot Preview Server Side Includes in Browser

    I am working on building a new site using server side includes for the main header graphic and menu items. For testing purposes, I created an .html file with one <div> tag containing a single graphic and an .shtml file with the server side include co

  • FaceTime Video camera is not working

    after updating my OS in Macbook Air, my Video camera is not working. pls suggest me about how to fix that and make video working.