How to choose the value null

Hi all

I use oracle 9i.
I have a Book table and there column: book_id, book_name, book_rating etc.
Books are rated on a scale of 1 to 10, and the database is associated with a book.
There are books that are not yet rated and these recordings has a null value in this column to book_rating.

I want to write a cursor that can browse this book_rating.
I started with a loop for iteration of 1.10 (because I in 1.10 loop)
and in this loop, I declare my cursor and where clause wrote:

where book_rating = i;

This condition will take care of the sides with a value of 1 to 10, but this custom work for null values.

How can I write this code so that I can understand the books that are not rated so far (null in the column book_rating)?

Thank you

Will be something like this help

FOR I IN 0..10
LOOP
     SELECT ..
       FROM ..
      WHERE NVL(BOOK_RATE,0) = i;
END LOOP;

Tags: Database

Similar Questions

  • How to choose the value of a string are numeric together and words of letters (for example, TEST)

    Hi all

    How to choose the value of a string are letters (for example, TEST) and all numeric...

    for example
    TEST 123456
    TEST 34567
    123456 ABCD
    1234 TEST
    TESTING 12345
    TEST 1@234$
    YOUR T 123456

    I want the results of the query as below.
    TEST 123456
    TEST 34567

    And I tried to use regexp_like in this case but without success. See the code below.
    SELECT * FROM TABLE WHERE regexp_like (Description, ' [TEST] % & [[: digit:]] + $');

    How can I do this, please answer.

    Thank you

    WF

    If you want to return only the rows that contain the string 'TEST', followed by zero or more space characters, followed by one or more digits?

    How about this:

    SELECT *.

    FROM my_table

    WHERE REGEXP_LIKE(description,'^TEST\s*\d+$')

  • How to reset the value of a list of entry of null values

    Hello

    Jdev 12.1.3.0

    How to reset the value of a list of entry of null values

    Thank you

    AR

    Place this code in your ViewRowImpl (base) class and use it when you need to reset _all attributes applied by LOV

    @Cvele: in fact, this will happen "by design" when you set the attribute which has attached lov to null, so there is no need of additional code.

    See also this blog: binary: prevent the execution of query unwanted in British Colombia ADF when used in Non - UI applications

    My previous answer is more related to this approach:

    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterator = bindings.findIteratorBinding("IteratorName");
    Row r = iterator.getCurrentRow();
    r.setAttribute("SomeAttrib", null);
    

    Dario

  • How to choose the textfield values form and calculate

    Treat all

    Urgent please help

    How to choose the textfield values form and calculate totals. IE when clint fill amount textfield other textfields automatically calculate and display values. I am using uninstall.

    Thanks in advance

    My code is more

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > Untitled Document < /title >

    < / head >

    < body >

    < table width = "400" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >

    < tr >

    < td width = "187" align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "amount_gbp" > total (GBP): < / label >

    < / strong > < table >

    < td width = "14" height = "30" > < table >

    < td width = "199" height = "30" > < label >

    < input type = "text" name = "textfield" id = "textfield" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "admin_char_gbp" > Admin amount (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield3" id = "textfield3" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "agent_char_gbp" > Agent Charges (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield4" id = "textfield4" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "total_amount_gbp" > amount Total (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield6" id = "textfield6" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "total_paid_gbp" > Total paid (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield7" id = "textfield7" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "balance_gbp" > balance (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield8" id = "textfield8" / >

    < / label > < table >

    < /tr >

    < /table >

    < / body >

    < / html >

    Here´s a pointer which will show you how to set the calculation within a javascript function: dynamically calculate the sum of the fields

    See you soon,.

    Günter

  • Siri in him sending text with the value 'NULL '.

    When I say, "Siri, text my wife, 'X', ' Siri responds correctly,"here is your message to Jill: 'X'. "" "  "Ready to send it?"  I say 'Yes' and sends the message.  As soon as I get a text from my carrier saying the recipient of the message was invalid.  100% of the time, I see that Siri has sent a text with the value NULL.

    I tried to restart my phone.  I tried to remove and re-add my contacts.  Anyone else having this problem?  Someone knows how to solve?

    If it's by the carrier, you should contact them and see what they receive in return for their side. Ive had Siri send messages for me and I have never seen this one IOS.

  • using the function - how to use the values of the input variables on the table select statement names

    Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.

    CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    )

    RETURNS INTEGER

    AS

    -Declaring variables

    v_is_true INTEGER.

    BEGIN

    SELECT

    CASE

    WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)

    THEN 1

    ON THE OTHER

    0

    END

    IN

    v_is_true

    Of

    in_schema.in_tablename

    ;

    RETURN v_is_true;

    END;

    /

    When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist

    How to use the values of the input variables on the table select statement names?

    Hello

    Here's a way you can use dynamic SQL statements for this task:

    CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE

    (

    in_schema IN VARCHAR2,

    in_tablename IN VARCHAR2,

    in_datefield IN VARCHAR2,

    in_first_date DATE DEFAULT SYSDATE - 1,.

    in_last_date DATE by DEFAULT NULL

    )

    RETURNS INTEGER

    AS

    -IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield

    -contains all the dates in the in_first_date of the range through included in_last_date

    - and it returns 0 if there is no such lines.

    -If in_last_date is omitted, the search only the data on in_first_date.

    -If in_first_date is omitted, it defaults to yesterday.

    -Time parts of the in_first_date and in_last_date are ignored.

    -Declaring variables

    sql_txt VARCHAR2 (1000);

    v_is_true INTEGER.

    BEGIN

    sql_txt: = 'SELECT COUNT (*).

    || 'FROM ' | in_schema | '.' || in_tablename

    || 'WHERE ' | in_datefield | ' > =: d1'

    || «AND» | in_datefield | '< >

    || 'AND ROWNUM = 1';

    dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE");  -For debugging

    Sql_txt EXECUTE IMMEDIATE

    IN v_is_true

    With the HELP of TRUNC (in_first_date) - d1

    TRUNC (NVL (in_last_date

    in_first_date

    )

    ) + 1                -- d2

    ;

    RETURN v_is_true;

    END is_ydaydata_to_table;

    /

    DISPLAY ERRORS

    If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above.  In this way, you can easily see exactly what will be executed.  Comment out the call to dbms_output under test is completed.

    Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future.  For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days.  The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).

  • How to get the value with DBSequence in EL links

    Hello

    I have a DBSequence type id and check if the value is null or positive

    #{bindings. Id.inputValue! = null and links. Id.inputValue > 0? {"Edit": "Create"} does not work because the links. Id.inputValue returns a DBSequence and cannot convert Long

    How to get the value?

    JDev 11.1.1.6

    You can try this:

    #{bindings. Id.inputValue.sequenceNumber.value! = null and links. Id.inputValue.sequenceNumber.value > 0? {'Edit': 'Create'}

    Jean Lou

  • How to count the values in row

    Hello

    50 columns in a table are and 10 records are there. In these 10 records are not inserted not all columns (some are null values). How to find the values of The Count of Record (row).

    For example

    Table
    P1 p2 p3 p4 p5 p6 p7 p8 p9 p10...

    10 20 30 40 50
    20 30
    60 80



    In the table below - before, how to find
    the number of values in 1 record is 5
    the number of values in 2nd record is 2
    the number of values in 3rd record is 2




    --
    Thank you and best regards,
    Hari
    decode(p1,null,0,1)+
    decode(p2,null,0,1)+
    decode(p3,null,0,1)+
    ...
    
  • Please show or ask how to create the value of arrayOfValues of setValuesAtTimes parameter?

    Hello AEScriptComm,

    I have a few small scripts that use the method setValueAtTime successfully placing a keyframe on the existing layers of maskPath, but as you can see in the scripts below, results of setValueSatTimeS errors using IE: "Array is not of the correct type", "value is not an array" or "Null is not an object", depending on ,...

    (A) what variable is used as the value of parameter IE:

    .maskPath;

    . maskPath.value;

    . maskPath.value.vertices

    (B) what kind of table is used as the parameter value as in:

    var addTheseKeys = new Array ((1,2,3,4);    (as a parameter of the time)...

    (with either)

    var keyValues = new Array([10,10],[100,100],[15,50],[100,120]);             ...." ]) "

    (GOLD)

    var keyValues = [[10.10], [100 100], [15.50], [100 120]];                               ... (Array of arrays? RE: " ]] " )

    I just read a 'push' of the values in a table may be necessary?, but I was hoping someone who knew setValuesAtTimes could show it please...

    1) .. How to create the value of arrayOfValues of setValuesAtTimes parameter?

    1 (a): WORK setValueAtTime script...

    App.Project.Item (1) .layer (1).property("Masks").property ("mask 1");

    var app.project.item = myProperty (1) .layer (1) .mask (1) .maskPath;

    myShape = app.project.item (1) .layer (1) .mask (1).maskPath.value;

    myProperty.setValueAtTime(1.0,myShape);

    1 (b): If there is no script setValuesAtTimes...

    prop1 = app.project.item var (1) .layer (1).property("ADBE_Transform_Group").property ("ADBE Position");

    var fourKeys = 4;

    var addTheseKeys = new Array (1,2,3,4),

    var keyValues = new Array (10, [10], [100 100], [15.50], [100 120]);

    var app.project.item = myProperty (1) .layer (1) .mask (1) .maskPath;

    myShape = app.project.item (1) .layer (1) .mask (1).maskPath.value;

    var myVertices = app.project.item (1) .layer (1) .mask (1).maskPath.vertices;

    myProperty.setValuesAtTimes (keyValues, addTheseKeys);

    app.beginUndoGroup ("Keys");

    ~ for (var k = 0; k < fourKeys; k ++)

    //~ {

    ~ prop1.setValueAtTime (keyValues [k], addTheseKeys [k]);

    //~ }

    myProperty.setValuesAtTimes (keyValues, addTheseKeys);

    app.endUndoGroup ();

    .. Thanks for any advise\suggestions,

    J

    (A). maskPath.value; It's always a Shape(). (maskPath is a property, not of a shape on its own, and maskPath.value.vertices is only a part of the shape data).

    (B) nothing of what you propose... that is why your failed script fails.

    var keyValues = new Array([10,10],[100,100],[15,50],[100,120]); and

    var keyValues = [[10.10], [100 100], [15.50], [100 120]]; are just as good as arrays of points, the only thing is that keyValues are arrays of objects Shape().

    Read the guide and script for how to report a form of this post (just wrote it...): http://forums.adobe.com/thread/1419866?tstart=0

    Your keyValues array should look like this: [keyValues0, keyValues1, keyValues2, keyValues3], where each entry is a Shape().

    Xavier.

  • How to use the value of the page element in other pages too?

    Hi all

    How to pass the value of the item P26_NO from 26 to all other pages (such as 1, 2, 3... 25) using the & P26_NO. ???
    I set the default for this item.but I can't able to find value in the session state itself?

    Please post your suggestion here!

    Thank you and best regards,
    Robette.

    Robette wrote:
    Hi Amelia,.

    Through application process only we can able to save the page element value in session state? is there another way?
    Since my requirement is like I need to display footer text in all the pages, I have the version number included in this text, so I created a table and my intention to create an item and passing the point value for all other pages and see that point value & P26_NO. in the text. Version number is dynamic, it will change at each deployment.
    Is another way simple, other than my approach?

    Thank you best regards &,.
    Robette.

    You should use point demand for it and an application process to fill

    IF :APP_ITEM_NAME IS NULL THEN
      APEX_UTIL.SET_SESSION_STATE('APP_ITEM_NAME','myvalue');
    END IF;
    

    Published by: VC on June 25, 2012 13:48

  • How to get the values of page jspx (view layer) to the custom method defined in AM

    Hello

    I have 1 text field and 1 submit to homepage.jspx. When I click the button submit, it will call the custom method defined in the 'Module of the Application' java class (ApplicationModuleImpl.java). Can I know how to get the value of this text field in this custom method.

    I used the getter and setter method, however it didn't work as it is defining the value correctly, but get method returns null. Its not allowing to use FacesContext. Could someone please tell me how to get the value of the text field to this custom method (that is, using ADFContext,... something like that)

    Thanks in advance

    User,
    you have mixed up something here. Bean (as you did) cannot use the module of the application. They belong to different layers.
    I suggest you to look at some first tutorials (http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm) or watch the developer guide http://docs.oracle.com/cd/E16162_01/web.1112/e16182/toc.htm and take a look at some of the videos http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html

    Timo

  • Calculated field with the currency formatting, and hiding the values null

    I am designing a PDF form for quote and I have a field defined to multiply the amount of an article and the unit price to the total price.  There are 5 lines on each quote, and if users are citing only 1 or 2 items I want the values null in fields unused price extended to be hidden.

    I did it with the following script

    If (event.value == 0) event.value = ";

    But when I enter the quantity and total price of price is displayed as a regular number (100) instead of currency ($100).

    I can format to currency with

    Event.Value = util.printf ("$%.2f", event.value);

    I don't know there's a way to combine to give rise to such a situation then, so if the field is 0, make null and if not then format as currency but I don't know how to do it.

    Any help would be appreciated.

    Andrew

    Newer versions of Acrobat hide zero for fields values using the number format and with a currency symbol. »

    But since you can't control the updating of user systems, you must use a small function documented for formatting numeric fields on the fly.

    With the extended price field set to 'None' format, you can add the following script to the Validation script "Custom" or add it to a custom JavaScript calculation. The "Custom Validation will work with any method of calculation. Note that the form must be cleaned or recalculated to see the result of the validation script change.

    if(Event.Value == 0) {}
    Event.Value = ""; set the field value to null to a value of zero
    AFNumber_Format (2, 0, 0, 0, "", true); number with no currency symbol format
    } else {}
    AFNumber_Format (2, 0, 0, 0, "$", true); for the format of the values non-null for number with the currency symbol
    }

    The positional parameters are the number of decimal places, the Style separator, negative value Style, Style of (unused) currency, currency symbol, the currency symbol Pre-hanging chain.

  • How to get the value of the VO to the lov controller?

    Hello

    Can I know how to get the values of the View object, then pass in lov controller to execute the query... pls help...

    I tried the below:

    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);

    OAViewObject vo = (OAViewObject) am.findViewObject ("SeaoeAutoMosSummaryVO1");
    String s_it = (String) vo.getCurrentRow () .getAttribute ("ItemType"); / / If I enable this line, it will return the nullpointerexception error
    OAViewObject itemVO = (OAViewObject) am.findViewObject ("SeaoeAutoMosFIVO1");

    If ("lovValidate". Equals (PageContext.GetParameter (EVENT_PARAM)))
    {
    itemVO.setWhereClause (null);
    System.out.println ("b4 execute111");
    itemVO.setWhereClauseParams (null);
    itemVO.setWhereClauseParam(0,"F");
    itemVO.setWhereClauseParam(1,"OHO");
    itemVO.executeQuery ();
    }

    }

    yuchijoyce wrote:
    Jin

    I wanto add new line, the lov CO will have the value 2 in the base page move to filter the lov...
    the problem, I do face is: failed to get the vo value (new line) in lov CO.

    Try setting the PPR action with this field which will set the value in the session then get session value in the controller of the LOV and put the Original where clause.

    Thank you
    AJ

  • Photoshop Elements 8, how to show the value, the hue and saturation of a specific area of a pickture?

    Hello

    Photoshop Elements 8, how to show the value, the hue and saturation of a specific area of the image?

    How to choose the area? Which tool?

    Thank you in advance, Karl

    Make sure first that your range of information is visible: window menu / Info (shortcut F8)

    In this palette, click the small icon 'more '.

    Select "Palette Options".

    and choose HSB to second reading of palette.

  • How to set the value of a field from the LOV of another field.

    I'm trying to figure out how to set the value of a field (P_PROGRAM) to the value of another field of based lov (P_STATE).

    The P_PROGRAM field is a hidden field. The P_STATE field is a required field and is based on a list of values for the State Codes.

    When a user selects the State to P_STATE, the field of the P_PROGRAM should be set to this value, as well.

    I tried different ways to get there via a function call on the post for the calculation of the field P_STATE, defining the source P_PROGRAM to the value of the page item P_STATE put varialbles, creating a process before SENDING, and they all still come back as having a NULL value for P_PROGRAM, therefore impossible to create the file in the db as the PROGRAM is a mandatory field in the table.

    Can you please help? Thank you, Laura

    Laura,

    It is always helpful if you provide information about the Apex version you are using. The Apex 4 you can use Dynamic Actions to achieve this. In earlier versions is possible using processes to submit or javacsripts, as well.

    Heres how you do in 3.x with treatment to submit, to make it work in 4.0 as well.

    1 do the P_STATE ' select list submits the Page.
    2. Add a calculation on the point P_PROGRAM, or write to him assign a value based on a process. The treatment should be OnLoad after the header
    3. If the page does not have an unconditional branch that loops on itself, add a. NOTE: The direction must be the last branch (larger sequence number) and should have checked "Save Session State".

    This is what will happen
    a. when the State is selected Page will be submitted
    (b) it will take the unconditional branch to himself and save the value of P_STATE
    c. the calculation process / fills the value of the P_PROGRAM element when the page reloads

    Kind regards

Maybe you are looking for

  • Photos can not find the original files

    Since the switch to Photos for Mac, when I double click on a thumbnail to enlarge, a large percentage of my photos have a message that the original file is not found and gives me a chance to find the missing file. In iPhoto, where migrated most of my

  • Failure due to bad blood?

    Hello I bought a motorcycle G to the Peru, and I took it to the Switzerland. In Peru, there are 110V 50 Hz and in Switzerland is 230 v and 50 Hz also. Is it possible that the PCB received a short circuit and burned when I tried to load it in Switzerl

  • Error: wininit lsass.exe windows server restart, event ID: 1000, 1001, 1015, 6005, 6006

    Hi everyone, I recently joined in a Banking Corporation as a leader of IT below support that I explained about an error that is impossible to fix. This company is running windows server 2008 r2 standard 64 bit OS sp1. HP proliant DL380 G7 intel xeons

  • navigator_invoke &amp; mailto

    I had successfully used this code to open an email with BC OS 2.0.x: bps_initialize(); char *pError; navigator_invoke(email.toUtf8(), &pError); bps_shutdown(); However, my PB is now running the beta version 2.1 and it no longer works. Has anyone else

  • PIX, VPN, PAT and static

    I want to activate an incoming and outgoing VPN on a PIX configured with PAT. I enabled ESP and UDP/500 on the appropriate access to the lists, but must provide a static for inbound traffic. I already use a static for incoming SMTP traffic, and I don