Passing check box values to WHERE clause

Hi,
I have created a Data block - 'CONTACTS' (Database data block)
and has database item - 'Code', 'Descr'
The number of records displayed is set to 5.
Value When checked - 'Y'
Value When Unchecked - 'N'
Check box mapping of other values - 'unchecked'
I am writing the code inside 'WHEN BUTTON PRESSED'. My main objective is to return the count of records based
based on several conditions and one among them is CODE which is can be single or multiple based on the check box checked.
The requirement is when i check one or multiple checkboxes, i should pass the 'Code' item values to the WHERE clause.
Right now whenver i am trying to do so, only the current record value is copied to the WHERE clause.
I have tried using basic loop but things havnt worked.
Logic tried with basic LOOP
BEGIN
GO_BLOCK('CONTACT');
IF :contact.cb = 'Y' THEN
LOOP
IF p_where is null then
p_where := :contact.code;
else
p_where := p_where ||','||:contact.code;
end if;
exit when :system.last_record = 'TRUE';
next_record;
END LOOP;
end if;
MESSAGE ( 'p_where :'||p_where);
MESSAGE (' ');
END;
And Even if i write the LOOP before the first IF, it return me the current record value and move to the last record.
please guide me where am i wrong.
Regards.
Anoop.

Try something like this:
FIRST_RECORD;
LOOP
  IF :contact.cb = 'Y' THEN
    IF p_where is null then
       p_where := :contact.code;
     else
       p_where := p_where ||','||:contact.code;
     end if;
   END IF;
  exit when :system.last_record = 'TRUE';
  next_record;
END LOOP;
-- END LOOP;
MESSAGE ( 'p_where :'||p_where);
MESSAGE (' ');
END;

Similar Messages

  • How to pass parameters to function in  where clause....

    I have a select statement like this
    SELECT XX_AIR_TICKET_EMP_BAL(:P2) from dual
    is it possible to pass to variable p2 from where clause
    like
    SELECT XX_AIR_TICKET_EMP_BAL(:P2) from dual
    where :p2 = :p1
    user can enter only in p1 so that p2 should get passed.
    Reson for this wierd requirement:In Oracle apps i cant use bind variable in select clause value set..? please ignore this reason if u are not in oracle apps...
    Tell me the solution..
    Is there any way...
    setting some env variavle aor anything

    [email protected] wrote:
    I have a select statement like this
    SELECT XX_AIR_TICKET_EMP_BAL(:P2) from dualWhy a SELECT statement? This calls the SQL engine. The function is PL/SQL. This now needs the SQL engine to context switch to the PL engine. The PL engine runs and returns a value (across memory boundaries) to the SQL engine. The SQL engine now needs to return that value as part of the output from a SQL cursor.
    Why do all this? Surely it is a lot easier and better for performance to call the PL engine directly using an anonymous PL block. E.g.
    begin
      :P3 := XX_AIR_TICKET_EMP_BAL(:P2);
    end;
    is it possible to pass to variable p2 from where clause
    like
    SELECT XX_AIR_TICKET_EMP_BAL(:P2) from dual
    where :p2 = :p1Why?
    This can be done as part of the PL block as follows:
    begin
      if :P2 = :P1 then
        :P3 :=  XX_AIR_TICKET_EMP_BAL(:P2);
      end if;
    end;But then why construct conditional statements dynamically?
    It would be a lot easier to have a new function that does the condition, e.g.
    create or replace function getAirTicket( p1 number, p2 number ) return number is
    begin
      if p1 = p2 then
        return( XX_AIR_TICKET_EMP_BAL(p2) );
      else
       return( null );
      end if;
    end;

  • Fetching sub-screen check box value in module pool

    Hi,
    i hav a req in which i craeted a sub-screen in a standard sap screen QA11 using screen -exit.
    This sub-screen has two check box's for 2 approvals.I hav craeted as screen with this 2 check box and made that as a sub-screen to main screen.
    I hav few validations to be performed on these 2 check-boxes.
    1.Enabling and disabling of resp check-box based on some condition.This is happening as i hav written some logic in PBO of the screen.
    2.Validations hav to be performed on the check-box like if user clicks a check-box that value has to be captured and stored in a Z custom table.My main issue comes here.i hav written some code in PAI,but when i put a break-point,that code is not at all getting triggered.
    Kindly,let me know how can i get the check-box value from the sub-screen which is craeted in the standard screen of QA11 using screen-exit.
    Thanks in advance

    Hi,
    May be your code is written in PAI of some other screen.
    check SY-DYNNR and also use this where you are checking chekbox value.
    make sure your code is written in PAI of same subscreen
    Thanks
    Raghav M.

  • How to insert check box value in table?

    Hi all
    kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
    thanx in advance

    Hi,
    There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
    What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
    (you cannot define boolean as a datatype for a column).
    If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
    (for the rest if it's Oracle Forms then everything is already said).
    Edited by: user11268895 on Aug 17, 2010 10:44 AM

  • Accessing check box values in to WF

    Hi guys,
    i am looping through a list to create simple table with some check boxes ( <FieldLoop for='loopvar' in='variables.apps[*]'> ). i have specified checkbox field name - as "loopvar"
    <Field name='loopvar'>
    <Display class='Checkbox'>
    <Property name='label'>
    <ref>loopvar</ref>
    </Property>
    </Display>
    </Field>
    how shud i pull / get the list of chek boxes selected on the userform in to WF? will the form return a list? and how shud be the name field syntax shud i use a ":varibales."? im confused. please guide me with the best practice to declare and access check box values
    Edited by: tea_or_kapi on Nov 20, 2009 10:44 PM

    Hi Raju,
    Try this.  Create another dataprovider within your web template?  This new dataprovider refers to a similar query, but this query definition should restrict values CG1, CG2, CG3 and CG4.  Assign this dataprovider to your checkbox.  Then make sure the properties of the checkbox affect all other dataproviders.
    Also, if this list is static, you could create an HTML checkbox object coding the options (cg1, cg2, cg3, and cg4) programmatically.  Then add javascript code to produce the proper filtering based on the users' selections.
    Let me know what happens.
    Larry

  • Update order user status based on a custom check box value in web ui

    Hi Experts,
    I have a requirement to Update the  user status based on a custom check box value in web ui.
    This is needed at the followup for a SR, the component is BT116H_SRVO, Details View.
    I created a value node with 4 checkboxes, based on the check box value, the corresponding user status
    need to be updated.
    How can I reach to the order save functionality of SAP in EH_ONSAVE method, so that syatem can capture my check box value, along with other screen fields, and append the status parameter in Order maintain?
    or do I have to call order maintain in even handler for checkbox, which will affect performance .....
    Pls help.
    Regards,
    Lakshmi

    Hi,
    In your event handler you can use bol entity corresponding to status BTStatusH and change the user status.
    Best regards,
    Caíque Escaler

  • FRM-40501 Error When Attempting To Change Check Box Value

    I am getting a FRM-40501 error when attempting to update/change a check box value. There are a few factors in my form setup that could be the problem, I will list them below:
    My initial problem was that my INSERT statement would not trigger to fire (based on an IF statement) when my check box value was not initially set to the value of 'Y', even though the initial value was set to 'Y' in the property palette (value when checked was set to 'Y' and value when unchecked was set to 'N'). So, to remedy this I placed a specific literal select of 'Y' and aliased it back to the name of my check box name in the data block query, like: SELECT 'Y' CB_SELECT_SCHOOL FROM user_schools. Then I changed the check box to a database item (value to Yes when it was No before my "SQL select cheat" in the data block query). This made the initial value 'Y' and satisfied my IF statement before my INSERT statement in my trigger. However, now I can not update the check box item.
    Does anyone know a better way to satisfy the initial value of my check box to 'Y', even though in the initial value parameter for my checkbox is set to 'Y' and forms is not really setting the initial value (when the check box is not set to a database item)?
    Thanks in advance.
    Kyle

    I have fixed my issue.
    I have reverted the check box to not be a database item, removed the "SQL cheat" of selecting 'Y' aliasing my checkbox name in the datablock SQL, and changed the initial value of 'N' in the check box property palette. This will force a change by the user making the check box value of 'Y', satifying my insert when-button-pressed trigger to fire and update the selected row.

  • How to pass the check box values from one view to another view

    Hi Experts,
    I have a selection screen view which consists of check boxes.
    WBS System status.
    Release                      Completed                  Closed as 3 check boxes.
    Note : The above ones are check boxes.
    Based on the selection made by the user, those values needs to be passed to second view which retrieves the data and
    displays the data accordingly.
    At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.
    Kindly advise.
    Regards,
    Chitrasen

    hi ,
    make a attribute of type WDY_BOOLEAN to achieve this functionality
    u need to follow these steps :
    1 in side ur component controller , under the ATTRIBUTES tab , make 3 attributes say attr1 , attr2 and attr3 of type WDY_BOOLEAN
    2 create a context node , cn_check and 3 context attribute ca_check1 , ca_check2 and ca_check3 in ur first view for
    release , complete and close check boxes
    3 inside the DOINIT of ur 1st view , set the attributes attr1 , attr2 and attr3 to blank
    wd_comp_controller->attr1 = ' '
    wd_comp_controller->attr2 = ' '
    wd_comp_controller->attr3 = ' '
    4 inside the method , where u r validating , if the check boxes are checked or not , read the attributes ca_check1 , ca_check2 and
    ca_check3
      DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
        DATA ls_cn_check TYPE wd_this->element_cn_check.
        DATA lv_ca_check1 LIKE ls_cn_check-ca_check1.
    *   navigate from <CONTEXT> to <CN_CHECK> via lead selection
        lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
    *   get element via lead selection
        lo_el_cn_check = lo_nd_cn_check->get_element(  ).
    *   get single attribute
        lo_el_cn_check->get_attribute(
          EXPORTING
            name =  `CA_CHECK`
          IMPORTING
            value = lv_ca_check1 ).
    IF lv_ca_check1 EQ 'X' .
    wd_comp_controller->attr1 = ' X'
    wd_comp_controller->attr2 = 'X '
    wd_comp_controller->attr3 = ' X'

  • Parameter attributes FM / Passing check box from FM ?

    Hi Experts,
    I hv a check box in Selection screen. I wanna to pass either ' ' or 'X' values from Z FM.
    So,
    I defined the check box as RSPARAMS in FM ( and also tried with defining locally as  DATA: CHECK_BOX.)
    I tried like,
    1st case,
    SELNAME - check_box
    KIND-P
    SIGN - nothing mentioned
    OPTION- nothing mentioned
    LOW- X (i.e. wanna check the check box)
    HIGH- nothing
    2nd case
    SELNAME - check_box
    KIND-P
    SIGN - I
    OPTION- EQ
    LOW- X  (also tried 'X')
    HIGH- nothing
    I observed in debug mode that, value is not passing!
    So,
    Wht is the correct?
    thanq.

    Hi,
    In the importing parameter..type xfeld.. Where XFELD is the data element which has 'X' or ' '
    im_check TYPE XFELD
    Thanks,
    Naren

  • Unable to pass comma separated values for in clause

    I have the following query : for :P_LEG_NUM Parameter when i am passing values like 1,2,5 as string type i am getting invalid number error... I have defined in clause for it but still it does not work.. For individual values like 2, etc it works... how can i pass comma separted values for this bind variable
    select trip_number as prl_trip_number,
           flight_number as prl_f_number,
           trip_leg_id as prl_trip_leg_id,
           leg_number as prl_leg_num,
           dicao as prl_dicao,
           etd_zulu as prl_etd_zulu,
           aicao as prl_aicao,
           eta_zulu as prl_eta_zulu,
           to_char(etd_zulu,'DD-Mon-YYYY HH24:MI') as prl_cb_etd,
           to_char(eta_zulu,'DD-Mon-YYYY HH24:MI') as prl_cb_eta,
           diata as prl_diata,
           aiata as prl_aiata,
          (select client_name
           from xxwfs_trip_header_details t_h
           where t_h.trip_number = t_leg.trip_number) as prl_client_name,
          (select to_char((select systimestamp at time zone 'GMT' from dual),'YYYY-MM-DD-HH24MI')
           from dual) as prl_curr_zulu_date
    from xxwfs_trip_leg_details t_leg
    where 1=1
    and t_leg.leg_number in nvl(:P_LEG_NUM,t_leg.leg_number)
    and t_leg.trip_number = :P_trip_no

    This is the problem know as <tt>'Varying IN List'</tt> issue.
    Check this - SQL and PL/SQL FAQ

  • Single or multiple check box values displayed in a textbox

    Hi Experts!
    I'm using the following script to display the values of check boxes in a text field.  I would like the word "and" to separate the values if two check boxes are selected. If more than two boxes are selected I want the values to be separated by a comma and then the last value be separated by "and".  Example of two check boxes selected:  A and B.  Example of two or more: A, B, C, and D.  Can this be done?
    form1.page1.page1SF.programs::calculate - (JavaScript, client)
    //displays the values of check boxes named programCB
    var aChkBx = [];
    var vChecks = programCB.all;
    for (var a=0; a<vChecks.length;a++){
    if(!vChecks.item(a).isNull) {
    aChkBx.push(vChecks.item(a).rawValue);
    this.rawValue = aChkBx.join(", ");

    So, the way I see it, you actually have four scenarios. Nothing is checked, one item is checked, two items are checked, and three or more items are checked.
    Here's how I did it.
    I have four checkboxes all with the same name, cb. (You could have many more, and it wouldn't matter as long as they're all named the same thing.) I'm presuming that you will use the captions from the checkboxes as the text you want to enter. I called my text area where I enter the information tfSentence. (It's not a text field, it's just called "Text" in the Object Library.)
    //we need to count how many boxes are checked
    var checked = 0;
    for (i=0; i<=cb.length; i++){
      if (xfa.resolveNode("cb["+i+"]").rawValue == 1) checked ++;
    //create a string variable to store our sentence
    var str = "";
    //look at the checked variable and choose our case from that
    switch(checked){
      case 0:
        //you may want to do more than just type out a sentence here, like a message box
        tfSentence.rawValue = "Nothing was selected";
        break;
      case 1:
        //you can set text that will appear before your list of items here
        //str = "preliminary text";
        for (i=0; i<=cb.length; i++){
          if (xfa.resolveNode("cb["+i+"]").rawValue == 1) str += xfa.resolveNode("cb["+i+"].caption.value.#text").value;
        //you can set text to appear after your list of items here
        //str += "ending text";
        tfSentence.rawValue = str;
        break;
      case 2:
        //str = "preliminary text";
        for (i=0; i<=cb.length; i++){
          if (xfa.resolveNode("cb["+i+"]").rawValue == 1){
            if (checked == 1) str += " and " + xfa.resolveNode("cb["+i+"].caption.value.#text").value;
            else str += xfa.resolveNode("cb[+i+"].caption.value.#text").value;
            checked--;
        //str+= "ending text";
        tfSentence.rawValue = str;
        break;
      default:
        //str = "preliminary text";
        for (i=0; i<=cb.length; i++){
          if (xfa.resolveNode("cb["+i+"]").rawValue == 1){
            if (checked == 1) str += "and " + xfa.resolveNode("cb["+i+"].caption.value.#text").value;
            else str += xfa.resolveNode("cb["+i+"].caption.value.#text").value + ", ";
            checked--;
        //str += "ending text";
        tfSentence.rawValue = str;
        break

  • How to pass the parameter in the where clause of the select statement

    Hi All,
    Iam getting one of the value from the Input otd and using this value i need to query one of the tables in oracle database and selected the table using the oracle eway otd like shown below .
    otdRISKBLOCK_1.getRISKBLOCK().select() .
    where clause in side the select takes a string parameter as Iam getting the string parameter from the input otd and passing this to where clause by creating a string literal after deployment it is giving an error saying "ORA-00920: invalid relational operator".
    can any one throw some input on this .
    Thanks in Advance
    Srikanth

    You will see this error if the search condition was entered with an invalid or missing relational operator.
    You need to include a valid relational operator such as
      =, !=, ^=, <>, >, <, >=, <=, ALL, ANY, [NOT] BETWEEN, EXISTS, [NOT] IN, IS [NOT] NULL, or [NOT] LIKE in the condition. in the sql statement.
    Can you throw some more light on how are you designing your project?

  • Capturing check box value into internal table

    Hi all,
    I am displaying the output including check box through following internal table.
    The checkbox is displayed before every record.
      <b>LOOP AT it_qals.
        WRITE:/  it_qals-t_val  AS CHECKBOX,
               5 it_qals-werk,
              12 it_qals-prueflos,
              30 it_qals-matnr,
              50 it_qals-charg,
              62 it_qals-lagortchrg.
        hide: it_qals .
      ENDLOOP.</b>
    I selected some of the records through check the checkboxes. when i click the <b>PUSHBUTTON TRANSFER</b>, those selected records only should transfer. i don't know how to modify the internal table with latest checkbox values. Initially checkbox values are blank.
    Is there any solution except Function Module.
    i would appreciate an earlier reply.
    Regards
    Prabhu

    Hello,
    Create one more table and transfer your entries into new table.
    I have attached my code for you.
    Regards,
    Naimesh
    REPORT ZTEST_NP NO STANDARD PAGE HEADING.
    TABLES: MARA, MAKT.
    DATA: BEGIN OF IT_MARA OCCURS 0,
          MATNR LIKE MARA-MATNR,
          MAKTX LIKE MAKT-MAKTX,
          SEL,
          END   OF IT_MARA.
    DATA: IT_MARA1 LIKE IT_MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
      SET PF-STATUS 'ZTEST'.
      PERFORM GET_DATA.
      PERFORM WRITE_DATA.
    TOP-OF-PAGE.
      PERFORM HEADER.
    AT USER-COMMAND.
      CASE SY-UCOMM.
      WHEN 'SELECT'.
        PERFORM GET_DATA_SELECTED.
        PERFORM WRITE_DATA_SELE.
      WHEN 'SELALL'.
        PERFORM SELECT_ALL.
        SY-LSIND = 0.
        PERFORM HEADER.
        PERFORM WRITE_DATA.
      WHEN 'DESEL'.
        PERFORM DESELECT_ALL.
        SY-LSIND = 0.
        PERFORM HEADER.
        PERFORM WRITE_DATA.
      ENDCASE.
    *&      Form  GET_DATA
    FORM GET_DATA.
      SELECT MATNR
             INTO TABLE IT_MARA
             FROM MARA
             WHERE MATNR LIKE 'IN10020%'.
      LOOP AT IT_MARA.
        SELECT SINGLE MAKTX
               INTO   IT_MARA-MAKTX
               FROM   MAKT
               WHERE  MATNR = IT_MARA-MATNR
               AND    SPRAS = SY-LANGU.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " GET_DATA
    *&      Form  WRITE_DATA
    FORM WRITE_DATA.
      ULINE /(50).
      LOOP AT IT_MARA.
        WRITE: / '|' NO-GAP,   IT_MARA-SEL AS CHECKBOX NO-GAP,
                 '|' NO-GAP, (10) IT_MARA-MATNR NO-GAP,
                 '|' NO-GAP, (35) IT_MARA-MAKTX NO-GAP,
                 '|' NO-GAP.
      ENDLOOP.
      ULINE /(50).
    ENDFORM.                    " WRITE_DATA
    *&      Form  HEADER
    FORM HEADER.
      ULINE /(50).
      WRITE: / '|' NO-GAP, (1) ' ' NO-GAP,
               '|' NO-GAP, (10) 'Material'    NO-GAP,
               '|' NO-GAP, (35) 'Description' NO-GAP,
               '|' NO-GAP.
    ENDFORM.                    " HEADER
    *&      Form  GET_DATA_SELECTED
    FORM GET_DATA_SELECTED.
      DATA:  L_CNT TYPE I.
      DO.
        L_CNT = L_CNT + 1.
        READ LINE L_CNT FIELD VALUE IT_MARA-MATNR INTO IT_MARA1-MATNR
                                    IT_MARA-MAKTX INTO IT_MARA1-MAKTX
                                    IT_MARA-SEL   INTO IT_MARA1-SEL.
        IF SY-SUBRC = 0.
          IF IT_MARA1-SEL = 'X'.
            APPEND IT_MARA1.
            CLEAR  IT_MARA1.
          ENDIF.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GET_DATA_SELECTED
    *&      Form  WRITE_DATA_SELE
    FORM WRITE_DATA_SELE.
      PERFORM HEADER.
      ULINE /(50).
      LOOP AT IT_MARA1.
        WRITE: / '|' NO-GAP,   IT_MARA1-SEL AS CHECKBOX,
                 '|' NO-GAP, (10) IT_MARA1-MATNR NO-GAP,
                 '|' NO-GAP, (35) IT_MARA1-MAKTX NO-GAP,
                 '|' NO-GAP.
      ENDLOOP.
      ULINE /(50).
    ENDFORM.                    " WRITE_DATA_SELE
    *&      Form  SELECT_ALL
    FORM SELECT_ALL.
      LOOP AT IT_MARA.
        IT_MARA-SEL = 'X'.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " SELECT_ALL
    *&      Form  DESELECT_ALL
    FORM DESELECT_ALL.
      LOOP AT IT_MARA.
        IT_MARA-SEL = ' '.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " DESELECT_ALL

  • Check box value assigned by Numeric Field rawValue

    This was asked and answered back in 2009 (http://forums.adobe.com/message/5944725#5944725), but I have a twist to the question:
    I'm able to get the action to work, but not right away. I had to click around on the form to make the check box tic. I assigned the following code to the JhammerPassed-named check box:
    if (JhammerSatTotal.rawValue <=80){
      JhammerPassed.rawValue =1;
    } else {
      JhammerPassed.rawValue =0;
    Essentially I have two boxes: one if they passed and one if they failed. So, if the value of the points awarded is greater than or equal to 80, then the 'passed' box tics. I added the less than version to the 'failed' box. They only seem to tic if I click on the JhammerSatTotal cell, then away, then back again. Is this just a quirk of the program or is there a way for it to be more responsive?
    Thanks!
    ~Laura

    I'm adding up 4 rows into JhammerSatTotal. The script I have in JhammerSatTotal is:
    Sum(form1.Page4.JhammerTest.Row1.JhammerSat1
    ,form1.Page4.JhammerTest.Row2.JhammerSat2,form1.Page4.JhammerTest.Row3.JhammerSat3,
    form1.Page4.JhammerTest.Row4.JhammerSat4)
    (I tried simpler code, but this was the only one that worked.) So, the 4 fields that the total field is adding up are: JhammerSat1, JhammerSat2, JhammerSat3, JhammerSat4. These 4 fields are user entered.
    Basically, my table looks as follows:
    Steps
    Points
    Sat
    Unsat
    Step 1
    10
    Step 2
    40
    Step 3
    10
    Step 4
    40
    Total:
    100
    Then, there are two check boxes under the table: Passed and Failed. The user enters points into the Sat and Unsat rows while the total row is added up. If the total in the Sat column is <= 80, the Passed box should be checked. And the Failed box if it's >80.
    Would this make a difference with your suggestion above?

  • Referencing Aggregated Column Value in Where Clause

    Hello -
    I'm trying to determine how I can accomplish the following in the most straightforward, efficient way.
    Among other things, I'm selecting the following value from my table:
    max(received_date) as last_received_dateI also need to evaluate the "last_received_date" value as a condition in my where clause. However, I can't reference my aliased "last_received_date" column value, and when I try to evaluate max(received_date) in the where clause, I get the "group function is not allowed here" error.
    Does anyone know of a good workaround?
    Thanks,
    Christine

    Hi,
    Column aliases can be used in the ORDER BY clause: aside from that, they cannot be used in the same query where they are defined. The workarounds are
    (a) define the alias in a sub-query, and use it in a super-query, like Someoneelse did, or
    (b) repeat the aliased expression, as in the HAVING-clause, below.
    Aggregate functions are computed after the WHERE-clause. (That explains why you can do things like
    SELECT  MAX (received_date) last_received_date_2008
    FROM    table_x
    WHERE   TO_CHAR (received_date, 'YYYY')  = '2008';).
    The HAVING-clause is like the WHERE-clause, but it is applied after the aggregate functions are computed, e.g.
    SELECT    deptno
    ,         MAX (recieved_date)  AS last_received_date
    FROM      table_x
    GROUP BY  deptno
    HAVING    MAX (received_date)    > SYSDATE - 7   -- Only show deptartments with activity in the last week
    ;

Maybe you are looking for

  • Unable to send or receive from C601 Bluetooth to A...

    Hi, I tried to send a file to my nokia c601, it got connected, all drivers installes successfully, yet I am unable to send a file, be it any fle type. When I send the file, I dont get even the request to accept the incoming file, just the data transf

  • Ipod and new mini mac

    I just got a new Mini Mac (intel) and want to upload my iPod to my new computer, the old one died:-( what's a easy (if there is) way? of course with i tunes. thanks

  • Does iMac Flat Panel have built in Dual Voltage Support?

    I have iMac Flat Panel 17" machine (PowerPC G4 1GHz) I am living in USA currently I am travelling to India where the power rating is 220V 50Hz instead of 110 V. I know all laptops have dual voltage support. Does iMac Flat Panel have built in Dual vol

  • I forgot my apple password for my airport/modem how can i recover it or change it? ?

    The password is still saved in my laptop but i cannot actually see what it is. I know it is 9 letters/numbers long. Please email me the answer to this problem on [email protected]!!

  • Receiver port missing in inbound idoc

    Hi All, I am posting idocs from XI to R/3. All the ALE settings have been done correctly. Idocs were being posted to R/3 successfully, however suddenly the idocs started failing in R/3 with error: EDI: Partner profile inbound not available When i che