How to use a "Case" statement in the negative

I am pulling data in the form:

SELECT
group_num,
co_id,
pr_id,
Co_id CASE
WHEN '5N' THEN ON 'YES '.
WHEN NOT '5N' THEN 'NO '.
END AS prod_type
FROM table1

I want to get a 'YES' result when co_id is '5N' and all co_id who are not '5N' a value of 'NO '...

I get an error "Missing Expression" and its pointing to the line 'IS NOT', so I obviously don't have the correct syntax.

Any help would be appreciated...

Published by: user12296489 on November 10, 2010 11:22

Hello

You're right: CASE can't compare NULL in the same way, it compares the values. My mistake.

I think that the searched CASE expression is what is needed here:

CASE
    WHEN  co_id  = '5N'  THEN 'YES'
    WHEN  co_id != '5N'  THEN 'NO'
END   AS prod_type

If co_id is NULL, it returns null.

Tags: Database

Similar Questions

  • Tuning - using the CASE statement in the WHERE clause of the query

    Hi all

    My request has been changed to use a CASE statement in the WHERE clause to examine the data to some columns based on a parameter value. This modified request is made a full table and constantly running scan. Please suggest what can be done to improve its performance:

    Query:
    SELECT LAST_DAY(TRUNC(TO_TIMESTAMP(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))) AS summary_date,
    os.acctnum,
    os.avieworigin_refid,
    COUNT(1) cnt_articleview,
    SUM(NVL(autocompletedterm,0)) cnt_autocompletedterm
    FROM TABLE1 os
    WHERE os.acctnum IS NOT NULL
    AND os.avieworigin_refid IS NOT NULL
    AND os.requestdatetime IS NOT NULL
    AND UPPER(os.success_ind) = 'S'
    
    AND CASE WHEN
    Param_ValueToCheck  = 'FULL' AND get_date_timestamp(os.requestdatetime)  BETWEEN 
    TO_DATE('01-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND
    TO_DATE('31-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS')
    THEN 1
    WHEN
    Param_ValueToCheck  = 'INCR' AND os.entry_createddate  BETWEEN 
    TO_DATE('01-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND
    TO_DATE('31-MAY-2011 00:00:00','DD-MON-YYYY HH24:MI:SS')
    THEN 1
    END = 1
    AND CASE WHEN
    Param_ValueToCheck  = 'FULL' AND os.entry_CreatedDate BETWEEN 
    TO_DATE('01-APR-2011 00:00:00','DD-MON-YYYY HH24:MI:SS') AND
    TO_DATE('07-JUN-2011 00:00:00','DD-MON-YYYY HH24:MI:SS')
    THEN 1
    WHEN
    Param_ValueToCheck  = 'INCR' THEN 1
    END = 1
    GROUP BY LAST_DAY(TRUNC(TO_TIMESTAMP(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))), os.acctnum,os.avieworigin_refid;
    Description of the table:
    (Number of lines: approx. > amount 600 000 000)
    Name                           Null     Type       
    ------------------------------ -------- ------------
    ARTICLEID                      NOT NULL NUMBER(20) 
    USERKEY                                 NUMBER(10) 
    AVIEWORIGIN_REFID                       VARCHAR2(10)
    SUCCESS_IND                             VARCHAR2(2)
    ENTRY_CREATEDDATE                       DATE       
    CREATED_BY                              VARCHAR2(10)
    FILENUMBER                              NUMBER(10) 
    LINENUMBER                              NUMBER(10) 
    ACCTNUM                                 VARCHAR2(10)
    AUTOCOMPLETEDTERM                       NUMBER(2)  
    REQUESTDATETIME                         VARCHAR2(19)
    Explain Plan
    SQL> select * from table(dbms_xplan.display);
    
    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 2224314832
    
    ----------------------------------------------------------------------------------------------------------
    | Id  | Operation            | Name              | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    ----------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT     |                   |   590 | 33040 |  2501K  (1)| 08:20:15 |       |       |
    |   1 |  HASH GROUP BY       |                   |   590 | 33040 |  2501K  (1)| 08:20:15 |       |       |
    |   2 |   PARTITION RANGE ALL|                   |   590 | 33040 |  2501K  (1)| 08:20:15 |     1 |1048575|
    |*  3 |    TABLE ACCESS FULL | TABLE1 |   590 | 33040 |  2501K  (1)| 08:20:15 |     1 |1048575|
    ----------------------------------------------------------------------------------------------------------
    
    
    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       3 - filter(UPPER("OS"."SUCCESS_IND")='S' AND CASE  WHEN ('FULL'='FULL' AND
                  "OS"."ENTRY_CREATEDDATE">=TO_DATE(' 2011-04-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "OS"."ENTRY_CREATEDDATE"<=TO_DATE(' 2011-06-07 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 WHEN
                  'FULL'='INCR' THEN 1 END =1 AND "OS"."REQUESTDATETIME" IS NOT NULL AND CASE  WHEN ('FULL'='FULL'
                  AND "ODS"."GET_DATE_TIMESTAMP"("REQUESTDATETIME")>=TO_DATE(' 2011-05-01 00:00:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ODS"."GET_DATE_TIMESTAMP"("REQUESTDATETIME")<=TO_DATE(' 2011-05-31 00:00:00',
                  'syyyy-mm-dd hh24:mi:ss')) THEN 1 WHEN ('FULL'='INCR' AND "OS"."ENTRY_CREATEDDATE">=TO_DATE('
                  2011-05-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "OS"."ENTRY_CREATEDDATE"<=TO_DATE('
    
    PLAN_TABLE_OUTPUT
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                  2011-05-31 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) THEN 1 END =1 AND "OS"."ACCTNUM" IS NOT NULL AND
                  "OS"."AVIEWORIGIN_REFID" IS NOT NULL)
    Published by: Chaitanya on June 9, 2011 02:44

    Published by: Chaitanya on June 9, 2011 02:47

    When it is executed individually, MERGE LOGIC 1 and LOGIC of MERGE 2 take about ten for a daterange of 30 days data.

    BUT FULL is to get the scores of APR - JUN, INCR becomes partitions for MAY so not both 30 days.
    Are compare us like with like?

  • Case statement in the process Page

    Request Express 3.2.1.00.11

    I put the following code in an anonymous block (will return no error) for a process Page;

    BEGIN
    INSERT
      INTO DAD_ASSESSMENT_REQUEST
    ( tenure_id
    , client_id
    )
    VALUES
    ( :P10101_TENURE_ID
    , :P10101_CLIENT_ID 
    );
    END;
    

    But when I put a statement case it throws the following error;

    1 error has occurred
    ORA-06550: line 7, column 3: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06550: line 3, column 1: PL/SQL: SQL Statement ignored
    

    BEGIN
    INSERT
      INTO DAD_ASSESSMENT_REQUEST
    ( tenure_id
    , client_id
    , (CASE 
       WHEN (:P10101_MEASURE_OPTION = 'AREA') THEN estimated_area_ha 
       WHEN (:P10101_MEASURE_OPTION = 'LINE') THEN estimated_length_km 
     END)
    )
    VALUES
    ( :P10101_TENURE_ID
    , :P10101_CLIENT_ID 
    , :P10101_X
    );
    END;
    

    Why is this code not work and it is possible to use a case statement in a Page Apex process

    Concerning

    Ben

    Benton says:

    Request Express 3.2.1.00.11

    I put the following code in an anonymous block (will return no error) for a process Page;

    1. BEGIN
    2. INSERT
    3. IN DAD_ASSESSMENT_REQUEST
    4. (tenure_id
    5. client_id
    6. )
    7. VALUES
    8. (: P10101_TENURE_ID)
    9. ,: P10101_CLIENT_ID
    10. );
    11. END;

    But when I put a statement case it throws the following error;

    1. 1 error has occurred
    2. ORA-06550: line 7, column 3: PL/SQL: ORA-01747: specification user.table.column, table.column or invalid column ORA-06550: line 3, column 1: PL/SQL: statement ignored
    1. BEGIN
    2. INSERT
    3. IN DAD_ASSESSMENT_REQUEST
    4. (tenure_id
    5. client_id
    6. (CASE
    7. WHEN (: P10101_MEASURE_OPTION = 'SPACE') THEN estimated_area_ha
    8. WHEN (: P10101_MEASURE_OPTION = 'LINE') THEN estimated_length_km
    9. END)
    10. )
    11. VALUES
    12. (: P10101_TENURE_ID)
    13. ,: P10101_CLIENT_ID
    14. ,: P10101_X
    15. );
    16. END;

    Why is this code not work and it is possible to use a case statement in a Page Apex process

    Of course, it is possible to use a CASE statement or expression (it is the latter) in a page APEX process. However, it is not possible to use an invalid syntax while doing so. Part of a clause INSERT INTO can contain only static column names.

    In general the SQL expressions (and also the bind variable, another cause frequent errors of syntax) can be used only in

    • the projections of the SELECT queries and subqueries
    • the right side of the disposals in the SET update clause
    • the lists of VALUES of INSERTs
    • WHERE clause predicates

    ReemaPuri wrote:

    Try this

    INSERT

    IN DAD_ASSESSMENT_REQUEST

    (tenure_id

    client_id

    estimated_area_ha

    estimated_length_km

    )

    VALUES

    (: P10101_TENURE_ID)

    ,: P10101_CLIENT_ID

    , (SELECT CASE WHEN: P10101_MEASURE_OPTION = 'SPACE' AND THEN: P10101_X)

    OTHERWISE, NULL END OF DOUBLE)

    , (SELECT CASE WHEN: P10101_MEASURE_OPTION = 'LINE' THEN: P10101_X)

    OTHERWISE, NULL END OF DOUBLE)

    );

    It's a good idea, but it can be simplified, eliminating unnecessary subqueries:

    insert into dad_assessment_request (
        tenure_id
      , client_id
      , estimated_area_ha
      , estimated_length_km)
    values (
        :p10101_tenure_id
      , :p10101_client_id
      , case
          when :p10101_measure_option = 'AREA' then :p10101_x
        end
      , case
          when :p10101_measure_option = 'LINE' then :p10101_x
        end);
    
  • How to use setViewportBounds (Bounds value) to the ScrollPane?

    How to use setViewportBounds (Bounds value) to the ScrollPane? This method is, visually, what for? I tried to put a specific Bounds.minY to have a precise scrolling in the axis Y in vain. I use the setVvalue() method to scroll, but it is not convenient to exactly locate a position in the coordinates of the node content listed in the scroll pane.

    The viewportBounds are the limits of the viewport (i.e., the visible part of the content) in the scrolling pane itself, if I understand correctly. The way to access programmatically is by setting the vValue property.

    I have not tried, but if you do something like

    scrollPane.setVmin(0);
    DoubleBinding vmax = new DoubleBinding() {
         { super.bind(scrollPane.viewportBounds(), content.heightProperty()); }
         @Override
         public double computeValue() {
            return content.getHeight() - scrollPane.getViewportBounds().getHeight() ;
         }
    };
    scrollPane.vmaxProperty().bind(vmax);
    

    to configure your component to scroll, then you can call setVvalue (...) and just pass a location of coordinates for your content node. This assumes that your content node is a region or a control; you will have to perhaps a little logic in the method computeValue() to deal with the cases where the display window is greater than the additional content.

  • Case statement in the filter responses

    Hello

    I'm trying to build a query in the replies that filter the returned data based on the number of current month. If the current month is 1 then we want to show every 12 months, we want to show under the current months months. If I use the following:

    Excerpt from WHEN (month of current_date) - CASE = 1 THEN 'calculated monthly values. "" MONTH "> = 1 ELSE 'calculated monthly values. "" MONTH "< extracted (current_date months) END

    I get the error below. Everything works fine until I have add the CASE.

    Error codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Geographical area: saw.views.evc.activate, saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool, saw.threadpool, saw.threads
    ODBC driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 27002] Near <>= >: syntax error [nQSError: 26012]. (HY000)

    You can use a case statement in a filter? If not, what are the other options, as appropriate?

    THX

    ziekc wrote:
    Hello

    I'm trying to build a query in the replies that filter the returned data based on the number of current month. If the current month is 1 then we want to show every 12 months, we want to show under the current months months. If I use the following:

    Excerpt from WHEN (month of current_date) - CASE = 1 THEN 'calculated monthly values. "" MONTH "> = 1 ELSE 'calculated monthly values. "" MONTH ".< extract="" (month="" from="" current_date)="">

    I get the error below. Everything works fine until I have add the CASE.

    Error codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Geographical area: saw.views.evc.activate, saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool, saw.threadpool, saw.threads
    ODBC driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 27002] Near <> =>: syntax error [nQSError: 26012]. (HY000)

    You can use a case statement in a filter? If not, what are the other options, as appropriate?

    THX

    Depending on your needs, when the month is January, you want every 12 months. any other number and you want the month 1 "1 less than the number this month. Yes? Here's what to do:

    In the filter on your date column, click the filter button, convert it to SQL and enter the following:

    MONTH (TableName.date_column) BETWEEN 1 AND CASE WHEN MONTH (CURRENT_DATE) = 1-12 THEN end of MONTH else (CURRENT_DATE)-1

    Here's the logic:

    (a) when the month is January, and then the case statement will give 12 and the filter will be:

    WHERE the MONTH (tablename.date_column) BETWEEN 1 AND 12... .or every 12 months.

    (b) when the current month is any month, say June, then the case statement will give a less than is the number of months, or in this case, 5.

    WHERE the MONTHS (tablename.date_column BETWEEN 1 AND 5 .or every 1 to 5 months (January to may))

    This will give you what you want...

  • How to use an if statement of javascript code

    Hello

    I have a lot of script transformation to search for text "signature of the employee" on each page in a multiple page and file for then the list in the console all pages that do not have the text of the "Signature of the employee" included.

    The script is still functional as one if statement must be included.

    Can someone advise please how to use an if statement in javascript code?

    var this.numPages = NUMPAGES;
    for (var i = 0; i < numpages; i ++)

    Search.Query ("Signature of the employee", "ActiveDoc");
    Console.println ("Pages that do not include a signature of the employee:" + this.pageNum + "");

    Any help will be most appreciated.

    "The signature of the employee" are the 2 words and not one. The method that you use to get the word gets only a single word. You also want to identify the "not true" found for the situation of the page and not the "real" found on the page.

    var ckWords; pair of words to test
    var bFound = false; Logical state of the words found
    Browse through the pages
    for (var i = 0; i)< this.numpages;="" i++="" )="">
    bFound = false; all found false
    numWords = this.getPageNumWords (i); number of words on the page
    loop through the words on the page
    for (var j = 0; j)< numwords;="" j++)="">
    get the pair of words to test
    ckWords = this.getPageNthWord (i, j) + ' ' + this.getPageNthWord (i, j + 1); test words
    do a check to see if the pair of words is string "Signature of the employee.
    If (ckWord == 'Signature of the employee') {}
    bFound = true; indicate the logical value found
    Console.println ("Pages that includes a signature of the employee:" + (this.pageNum + 1) +' ' "");
    break; no need to test more to this page
    } / / end of Signature of the employee
    } / / end of Word loop
    a test to see if the words not found
    if(Bfound == false) {}
    Console.println ("Pages that do not include a signature of the employee:" + (this.pageNum + 1) +' ');
    } / / end not found on the page
    } / / end of page loop

  • How to use windows search to search the contents of a bunch of files with random names / extensions?

    How to use windows search to search the contents of a bunch of files with random names / extensions? Plain txt files say 1,000 with random name of file extensions?

    You can always search within those, but you need to add extensions to the file system so that it knows to look inside these files.  You said that you have a lot, so it's perhaps tedious.  Here's How to search within several types of files.

    One thing you could try is rather to make a copy of this file, rename all the files to the same extension (even an extension false for example something.bill) and perform your search on this band.  Just an idea.

  • How to use a form created on the Capture of a vector

    People, I'm having difficulties to find out how to use a form created on the Capture of a vector. For example, I open Illustrator on my desk and, although the form is saved in a creative library of clouds, I can't find how to open this archive as a vector. I tried everything from capture, but then I can just export the shape as a bitmap image. I'm really lost on this.

    Hello Cristina,

    In Illustrator, simply drag the shape of your library panel in an open document. That's all there is to it.

    Mike

  • Help: How to use the Case statement in the ODI11g Interface?

    Hello
    My basic source I get 'Year' values and I want that these values result code in the interface and after translation want to push on the target system.
    Example:
    Database source, I get value for
    Year
    2010
    2011
    2012

    When I get the year 2010 I want to change the value in "FY10".
    When I get year 2011 I want to change the value in "FY11.
    and even for the year 2012 to "FY12.
    I've tried to make the Case statement, but had no success.
    I don't want to create the lookup table in the source system.
    Any help in this matter.

    Thank you

    Concerning
    Sher

    Published by: Sher Ullah Baig on August 26, 2012 17:52

    CASE
    WHEN source_column = '2010' THEN 'FY10.
    WHEN source_column = '2011' and THEN 'FY11.
    WHEN source_column = '2012' and THEN 'FY12.
    END

  • How to use FOLLOW-UP and COMPRESS the clause of the CREATE statement TABLE?

    my oracle's 10g and the statement of create table below:

    CREATE TABLE S005.q100

    (

    Q1 tank (1)

    )

    NOMONITORING;

    After you create this table, I ask USER_TABLES, but the value of the follow-up column is YES.

    I think there should be no how is? and also I have the same problem with the COMPRESS.

    Thank you very much


    Hello

    Heap - organized tables are your usual routine tables. It is created using the BUNCH of the ORGANIZATION of the CREATE TABLE statement clause. This is the default value.

    The other variant of this clause is ORGANIZATION INDEX, which means that you will create an organized Index of Table. In other words, it is a table that is stored in a B-tree, like an index.

    You also have an EXTERNAL BODY, which means that you will create an external table. Here is generally flat files outside of the database that you can order the database to see tabular to use SQL (read only) against. You will also need the settings on how the data are presented on the file, so that your database knows which column will match that of the data.

    The COMPRESS on 10G is known as the "basic compression" and it works on ordinary table segment blocks, which are organized by a bunch of tables.

  • using a Case statement to display the values of column even as table headers

    I have a database that has been set up kind of tricky, in that some tables are made up of columns that are field names and one link to another table that contain the data for these field... also names there ID displays as many lines instead of as a row of data. I would like to write a query to extract that information and display it as one line for each ID.

    example: table 1

    ID, name, itemresponse and itemcode, Description

    Dee Jones Childrens Hospital 123 SITE location

    123 dee Jones, Date of appointment next NEXTAPPT 22/04/2014

    123 dee Jones was on bedrest NOSHOW reason do not show

    I would like to have the display of data as a record on this same patient, instead of as 3 separate registers (with the Description column in table 1

    Table 2

    ID, name, place, Date of the next meeting, show no reason

    123 dee Jones Childrens Hospital 22/04/2014 was the bed rest

    I have included the code I worked on below my question, for me to get the desired results should I use the Case statement and it's the right way to do it below?

    (SELECT
    PAT.ID "PATIENT ID."
    PAT. FIRST | » '|| PAT. "PATIENT FIRST NAME."
    PAT. "PATIENT DOB," DATE_OF_BIRTH
    DS. Date 'Date of inpatients ',.
    Dai. ITEM_CODE "Item Code",
    Dai. DESCRIPTION "Description."
    Siad. ITEM_RESPONSE,

    Max (CASE WHEN dai. ITEM_CODE IS "SITE" THEN DAI. Decription
    ANOTHER NULL
    END) AS "name of the hospital."

    Max (CASE WHEN DAI.) ITEM_CODE IS 'NEXTAPPT' THEN DAI. ITEM_Description
    ANOTHER NULL
    END) AS 'next Appt Date. "

    Max (CASE WHEN DAI.) ITEM_CODE IS "LASTDATE" THEN DAI. Description
    ANOTHER NULL
    END) AS 'last visit Date.

    Max (CASE WHEN DAI.) ITEM_CODE IS 'NOSHOW' THEN DAI. Description
    ANOTHER NULL
    END) THAT "the reason has not shown".

    Of
    (PAT.ID "IDENTIFYING PATIENT",
    PAT. FIRST | » '|| PAT. "PATIENT FIRST NAME."
    PAT. "PATIENT DOB," DATE_OF_BIRTH
    DS. Date 'Date of inpatients ',.
    Dai. ITEM_CODE "Item Code",
    Dai. DESCRIPTION "Description."
    Siad. ITEM_RESPONSE

    Of

    dm_sessions Ds,
    dm_session_assessments dsa,
    DAS dm_admin_sections,
    dm_session_assessment_items Siad,
    Dai dm_admin_items,
    Po Patient_Orders,
    Inventory inv,
    Patients_Table PAT
    dm_admin_categories CAD

    where dsa.session_Id = ds.session_Id
    and PAT.ID = ds. Patient_ID
    and dsa.excluded_assessment =' no
    and dac.category_code = 'OPEN'

    and dsa.section_id = das.section_id
    and das.category_id = dac.category_id
    and das.section_code = 'northwest'
    and dai.section_id = das.section_id
    and dsai.item_id = dai.item_id
    and dsai.session_assessment_Id = dsa.session_assessment_Id
    and dsai.excluded =' no
    - and Dai.ITEM_ID = Dsai.ITEM_ID
    and Dai.ITEM_CODE IN ('SITE', 'NEXTAPPT', 'LASTDATE', 'NOSHOW')
    and po.patient_ID = ds.patient_ID
    and in. NDC_NO = inv. NDC_NO
    and inv. TDRUG_ABBREV = in. DRUG_ABBREV

    PAT.ID GROUP, PAT. FIRST | » '|| PAT. LAST, PAT. DATE_OF_BIRTH, ds. Date, dai. ITEM_CODE, dai. DESCRIPTION, Siad. ITEM_RESPONSE))

    Hello

    DATE is not a very good name for a column.  Use something like EVENT_DATE, that will not be confused with a keyword from Oracle, instead.

    I don't see something like this column in the CREATE TABLE statement.  He will always be the same value on all lines?

    Here's a way to get the results you requested:

    SELECT id

    first name | ' ' || LastName AS name

    Date of birth

    MAX (CASE WHEN item_code = "NEXTAPPT", THEN item_response END) AS next_appointment,

    MAX (CASE WHEN item_code = "LASTDATE" THEN item_response END) AS last_visit_date,

    MAX (CASE WHEN item_code = "SITE" THEN item_response END) AS location

    FROM mytable1

    GROUP BY id, firstname, lastname, dob

    ;

    Of course, I can't test it very well until you post INSERT statements for the sample data.

    I guess that 2 or more lines of the entry have the same id, then they will necessarily be first name last name, the name and date of birth, too.  No doubt they are standardized in your actual tables.

  • How to use interval set to raise the event every 5 seconds when if the statement is true?

    Here is a snippet of code something to im:

    if (MC_battleTrigR1a.hitTest(this._x, this._y, true)) {
         if (random(220) == 0) {
         //random(220) the code is onEnterFrame and so this random function is called repeatedly until eventually random(220) == 0;
         trace("random");
         gotoAndStop("battle");
         }
         //setInterval(???)
         //every 5 seconds->  trace("5sec"); and gotoAndStop("battle");
    }
    

    The player wanders in a box, in a random delay or after 5 seconds, it should send the player to the frame labeled: battle

    It works with the random (220) but I don't know how to do certainly go to frame: battle after 5 seconds.

    I don't know how to use setInterval correctly, I tried and failed.
    The code is nested in the onEnterFrame
    FPS: 24

    image tag: treePath

    Chassis number: 17

    I didn't say that you should avoid using onEnterFrame.  I said that your setTimeout must be outside your onEnterFrame loop:

    var tl:MovieClip = this;
    
    tl.onEnterFrame = function () {     if (MC_battleTrigR1a.hitTest(MC_player._x, MC_player._y, true)) {          delete this.onEnterFrame;          clearTimeout(gotoBattleTO);          gotoBattle();     }};
    
    
    
    function gotoBattle() {     clearTimeout(gotoBattleTO);     delete tl.onEnterFrame;     gotoAndStop("battle");}
    
    
    var gotoBattleTO:Number = setTimeout(gotoBattle,5000);
    
  • Satellite A210 - 16G (PSAELE) - how to use 4 GB and update the BIOS?

    Hello! I hope someone can answer a few questions for me.

    First of all is: How can I turn on my laptop to use all the 4 GB of RAM? OS is Win Vista Ultimate 32-bit with Service Pack 2. Now Vista all show the 4 GB of RAM, but don't use it. I activated the EAP in Vista, but still nothing. As I saw, I need to turn it on too memory remapping in BIOS but there is no option (my BIOS is ver.1.70).

    The second question relates to the BIOS. Because my version is 1.70 and there are more recent version 2.00; I get benefits if I update to BIOS? Someone has updated to version 2.00? And there are more options in the BIOS after update to version 2.00 (for example the memory remapping or a similar option)?
    I'm a little afraid to update BIOS, because sometimes my Toshiba freezes, and I would not hang during the update of the BIOS.

    And the final question is there any changelog to the BIOS? So I can see what is added and changed, and what's new in the new version of the BIOS. Because I could not find anywhere.

    Thanks for the responses to come.

    Hello!

    (1) you can use the entire 4 GB of RAM on a 32 bit OS. It is a due limitation of 32-bit technology. Windows Vista with Service Pack 2 may recognize the full 4 GB of RAM but not use it, more than 3.2 g.
    Here you can find more information about this limitation:
    http://APS2.toshiba-tro.de/KB0/TSB82022E0000R01.htm

    (2) about BIOS updated I can tell only must be made only if you have problems with the laptop. A BIOS update should never be done just for fun, because it of still a little risky. In the worst case, you can destroy the ROM module or complete motherboard.
    Update the BIOS doesn't normally contain new features or options. It s bug just setting. In addition it can t solve the problem with 4 GB of RAM and Vista 32 bit if you think that ;)
    If your laptop does not have 100% stable you shouldn't t update because it s too risky. Before the update, you should try to solve the problem of gel.

    (3) If a change log is available you can find it on the Toshiba site. If you can t find, there isn t available.
    That s all about this.

    I hope I could help a bit.

    Good bye

  • Case statement in the dynamic JavaScript code

    Dear friends,

    Using the version 4.2.6

    I applied this code in dynamic action to change the color of the intractive report rows of base on the State of the column.

    In my report, I have three columns VIP_GUEST, CANCEL_FLG, APPROVE_FLG.

    If cancel_FLG = "Y", then the color of the line should be red.

    IF VIP_GUEST = 'Y' AND CANCEL_FLG = 'n' then line color should be Orange

    If VIP_GUEST = 'n' AND CANCEL_FLG = 'n' then line color should be green

    How can I set the conditions in the code below. From ways below how to use the above code condtions.

    {$('td[headers="VIP_GUEST"]').each (function ()}
    If ($(this) () .text = ' don't) {}
    $(this) .find ('td').css({"background-color":"#FFFF99"});).closest('tr')
    } ElseIf ($(this) () .text = 'Y') {}
    $(this) .find ('td').css({"background-color":"#EEA196"});).closest('tr')
    } else {}
    $(this) .find ('td').css({"background-color":"#C6EA91"});).closest('tr')
    }
    });

    Hi Maxence,

    CORINE wrote:

    I changed condition in your code, and I have to set a condition more

    IF VIP = 'Y' AND APPROVAL = 'Y', THEN the color should be orange, once again.

    How can I set this condition in the code below.

    Try the following code:

    $('td[headers="CANCEL_FLG"]').each(function() {
          if ( $(this).text() === 'Y' ) {
            $(this).closest('tr').find('td').css({"background-color":"red"});
          } else if ( $(this).text() === 'N' ) {
              var vipflg = $(this).closest('tr').find('td[headers="VIP_GUEST"]').text();
              var aprflg = $(this).closest('tr').find('td[headers="APPROVED_FLG"]').text();
              if ( vipflg === 'Y' && aprflg === 'Y' ) {
              $(this).closest('tr').find('td').css({"background-color":"orange"});
              } else if ( vipflg === 'N' ) {
              $(this).closest('tr').find('td').css({"background-color":"green"});
            }
          }
    });
    

    Kind regards

    Kiran

  • Case statement in the SQL Query prompt dashboard

    Hi Experts,

    I use the following case statement to generate default values in the prompt dashboard based on a condition (the other guest-generated values). Below are two of the query I've tried and the syntax error. I tried all the possibilities (like giving apostrophes, double quotes, don't quote not etc.), but could not understand the question. Don't know what exactly I'm missing here.

    Query 1:

    SELECT

    CASE

    WHEN @{PRType} = monthly THEN 'Participant pay '. "" Amount of PayRate "="15000"

    WHEN @{PRType} = daily THEN 'Participant pay '. "" Amount of PayRate "="650"

    WHEN @{PRType} = hourly THEN 'Participant pay '. "" Amount of PayRate "="1"

    ELSE ' 0'

    END

    OF 'PA-Participant pay. '

    Query 2:

    SELECT

    CASE

    WHEN @{PRType} = monthly THEN "15000"

    WHEN @{PRType} = daily THEN "650"

    @{PRType} = schedule THEN '1'

    ELSE ' 0'

    END

    OF 'PA-Participant pay. '

    This is the query that is generated in the log with error message file.

    1 log message:


    SELECT CASE WHEN Hourly = Monthly THEN "Participant Payroll"."Payrate Amount" = '15000' WHEN Hourly = Daily THEN "Participant Payroll"."Payrate Amount" = '650' WHEN Hourly = Hourly THEN "Participant Payroll"."Payrate Amount" = '1' ELSE '0' END FROM "PA-Participant Payroll"

    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 27002] Near <>=: Syntax error [nQSError: 26012]. (HY000)



    Comment 2:

    ;CASE WHEN To_Char (Hourly) = 'Hourly' THEN 1 ELSE 0 END 

    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 43113] The message returned by OBIS. [nQSError: 27002] Near <>(): syntax error [nQSError: 26012]. (HY000)

    Sorry, I wasn't clear... you must always put this CASE statement in a valid SQL SELECT statement.

    SELECT

    CASE

    When ' @{PRType}' = 'Monthly' THEN '15000'

    When ' @{PRType}' = 'Daily' THEN '650'

    ELSE '0' END

    OF 'PA-Participant pay. '

Maybe you are looking for

  • Micro level resets to 0 (zero) and puts himself – mute 10 Windows

    Level of the microphone back to zero '0' and gets muted in Windows 10. I have read all and followed all discussions about this issues and I can't solve. I spent 3 hours on the phone with Microsoft replaces drivers and nothing wrong with drivers or mi

  • Satellite Pro A40: Could not download the drivers on the support site

    I could not download the drivers from the siteHELP PLEASE!http://support.toshiba-tro.de/Tedd-files2/0/BIOS-20070808115908.zip

  • To connect to the box of ubuntu via VPN via a server

    I have a ubuntu box connected to a SBS2003 server. A VPN tunnel to the SBS2003 server, I see each machine connected to the network - including the Ubuntu machine. However, when I try to access the files on the machine of Ubuntu, VPN, I can't make a c

  • Restore Windows 7 problems

    I upgraded to Windows 10 and had problems with my touchpad.  I finally decided to restore Windows 7 but am now getting this error when you try to update: Windows Update error 0 x 80070057.

  • Calibrate vs Adobe RGB profile

    Hello!I am trying to get my printed canvases in a reliable way.   I photographed my paintings, the uploaded on PHOTOSHOP, edited and saved then their printed in a local print shop.  I did all this, but what print does not match my retouching photosho