Help to DECODE statement

Hi all

I have data like this YEAR, to 2 columns ITEM_ID

A 001
B 002
C 003
A 006
Z 010

I want to interview based on criteria of the user of what rank they needed. for some reason I need if users choose Z as a criterion, I need a list of all elements with the class A.

SELECT * FROM my_tbl WHERE to rank = DECODE (: userprompt, 'A', 'A', 'B', 'B'...') Z', ??) ;

?? -im missing how to set the condition, I tried with "* has" but nothing bowed not, obviously, it ranks = ' * Z' and do not return all rows.

Oracle 10 G.
PLS NOTE * = not equal symbol, for some reason, it does not appear when I post the thread.,.

Thanks in advance.

Published by: [email protected] on Sep 4, 2008 10:30

This should do the trick:

where grade = decode(:userprompt,'Z',translate(grade,'A','x'),:userprompt)

Published by: Sentinel on September 4, 2008 10:36

Tags: Database

Similar Questions

  • Problem with Decode statement

    Hello

    I try to do the following in my report:

    If an employee is a family name. (dot) or a name of. (dot), the report does not display a point. An employee name consists of the family name, first name and middle name, which should all be concatenated sets. An attempt to achieve this goal, I have the following statement in my report:

    Decode (e.Surname, '.', (LTRIM (RTRIM ((INITCAP (e.FIRST_NAME))) |))) » '|| INITCAP (e.MIDDLE_NAME))),
    e.FIRST_NAME, '.', (LTRIM (RTRIM ((INITCAP (e.Surname))) |)) » '|| INITCAP (e.MIDDLE_NAME))),
    (LTRIM (RTRIM ((INITCAP (e.SURNAME))) | ',' |)) INITCAP (e.first_name) | » '|| INITCAP (e.MIDDLE_NAME))) as emp_name

    E employee

    Problem: The above statement only works for employees with the name of. (dot). It doesn't for the first names of dot. How to use the decode statement OR is there another way to do it without using the CASE statement?

    It seems my decode statement does not work with 2 different fields (name, first name) tested within the decode statement. Thank you.

    LTRIM and RTRIM the comma too:

    select rtrim(ltrim(rtrim(ltrim(', Somename ,',','),','))) Name
    from dual;
    
    NAME
    --------
    Somename
    
  • With the help of DECODE in WHERE clause

    Hi, I have a query which goes like this but does not work:

    {
    SELECT NVL (SUM (NVL(r.cload,0) * NVL(r.duration,0)), 0)
    IN saidi_sum_trip_caused_by
    SPM_REL_IND_TMP r
    WHERE substr(r.scode_trip_caused_by,6,4) in ('N001', 'N002', 'N003', 'N004', 'N005', "N006", "N007")
    AND (r.cload 0 GOLD r.cload IS NOT NULL)
    AND DECODE (R.CLASSIFICATION_TRIP, 't', r.duration < = 5,)
    r.Duration > 5);
    }

    It seems that there is a problem with my DECODE statement since I've noticed that when you use the DECODE function, a column is assimilated before the DECODE. However, in this case I can't equate the value of r.duration for DECODING since if the value of R.CLASSIFICATION_TRIP is ' t "then I should use < = I use >." How can I go about it? I tried to post in the forums of PL/SQL, but I think that very few people access this area. I get answers faster from here. Thank you.

    Fact

  • need help in decoding

    Hello
    Can someone write me help to decode for conditional and not in the event


    If substr (branch,-2, 2) = '00'
    = 'N'
    ELSE IF BW_SRC_TBL = 'Ease' AND the branch is present in the PS_UNDRAWN_GL_EXCEPTION table, then = ' don't
    On the other
    « Y »

    Hello

    A good example of why do you use CASE:

    NVL ( DECODE ( SUBSTR (branch, -2)
                     , 'N'     , DECODE ( bw_src_tbl
                                     , 'Facility',     DECODE ( SIGN (( SELECT  COUNT (*)
                                                           FROM     ps_undrawn_gl_exception
                                             WHERE     branch = m.branch     -- m refers to main query
                                                       ))
                                                   , 1     , 'N'
                                                )
                         )
              )
        , 'Y'
        )
    
  • DECODE statement and the argument limits

    No one knows the number of arguments that the DECODE statement allows you to enter. I currently have 863 and it gives me an error message when I try to run the query.

    Database - ORA-00939 error: too many arguments for the function.

    Thank you
    Chris

    Hello

    You still have too many parameters your decodes, the limit is 250 so you can enter only 124 values and decoded. I would like to nest decodes by doing:

    DECODE (point, "c1", "v1", "c2", "v2", "c3", "v3",..., DECODE (point, 'c4', 'v4', 'c5', 'v5', 'c6', 'v6',..., DECODE (...)))

    Alternatively, you can for example use case

    WHEN BOX point IN ( END)

    Rod West

  • Calculation grouping using decode statement?

    I have 4 sales reps who are numbered 9801, 9802, 9803 VRP, 9804.

    I have 3 support staff that support accounts by virtue of these representatives of REPS 1, 2, 3

    Support rep 1 will support the commercial attaché 9801 & 9802
    Support rep 2 will support the commercial attaché 9802 and 9803
    Support rep 3 will support the commercial attaché 9803 & 9804.

    Initially, I had a report which gave the results for all listed sales reps. The representatives of support and then imported it into excel and delete the records of the sales reps that they do not need.

    I want to create a page filter that will support rep select its name in a drop-down which shows only sales reps they support. So support rep 1 can select their name from the drop down and the report would only show information for the commercial attaché 9801 & 9802.

    I tried to do this with a calculation using the decode statement, but it does not work. It seems only to associate support rep to each sales representative. Is there a way to accomplish the grouping I want?

    DECODE (put into commercial service Rep.Sales,
    9801,'REP ' 1,.
    9802,'REP ' 1,.
    9802, ' REP 2',
    9803, ' REP 2',
    9803, ' REP 3',
    9803, ' REP 4'.
    9804, ' REP 4'.
    "ERROR")

    Hello

    I don't think you can do it easily if you want to use a filter on the page. This is because if a row is returned by the database that has a sales of 9802, then, the line must be on 2 pages.

    You can create a parameter to select the support rep and use this setting to select the records. Therefore, if the parameter is p_support_rep then you have a condition like:

    (: p_support_rep = 'REP1' AND sales_rep IN (9801, 9802)) OR
    (: p_support_rep = "REP2' AND sales_rep IN (9802, 9803)) OR
    (: p_support_rep = "REP2' AND sales_rep IN (9803, 9804))

    If you really need to use a filter on the page, then you will need to use a generator of line to create a line for each support rep and to join your generator line report by using a report similar to the one above. You can search for "Generator line" of this forum, or check out the learndiscoverer blog (http://learndiscoverer.blogspot.com/2008/10/row-generators.html) for more details.

    Rod West

  • Nesting help DECODE statements

    Hello. I'm writing a sql script to generate the data for payments report. I need to integrate specific to the field of ADDRESS VACUUM lines to REMOVE conditions. I'm using Address_Line1, Address_Line2, Address_Line3, most CITY, STATE, ZIP as Address_Line4. If all fields are empty, I need to remove the blank line and back up the other lines.

    Here is my if, THEN, ELSE conditions. There are 9 possible scenarios that I have identified. Can you please help me write this in SQL with the DECODE function?
    IF CITY||STATE||ZIP IS NULL               
    THEN AD1='12115 Rainbow Road', AD2='Hartford Heights, MO 60226'               
    ELSE               
         IF ADDRESS_LINE1 IS NULL          
              IF ADDRESS_LINE2 IS NULL     
                   IF ADDRESS_LINE3 IS NULL
                   THEN USE HOME ADDRESS
                   ELSE vAD1=ADDRESS_LINE3, vAD2=CITY||STATE||ZIP
                   ENDIF
              ELSE     
                   IF ADDRESS_LINE3 IS NULL
                   THEN vAD1=ADDRESS_LINE2, vAD2 = CITY||STATE||ZIP
                   ELSE vAD1=ADDRESS_LINE2, vAD2=ADDRESS_LINE3, vAD3=CITY||STATE||ZIP
                   ENDIF
              ENDIF     
         ELSE          
              IF ADDRESS_LINE2 IS NULL     
                   IF ADDRESS_LINE3 IS NULL
                   THEN vAD1=ADDRESS_LINE1, vAD2=CITY||STATE||ZIP
                   ELSE vAD1=ADDRESS_LINE1, vAD2=ADDRESS_LINE3, vAD3=CITY||STATE||ZIP
                   ENDIF
              ELSE     
                   IF ADDRESS_LINE3 IS NULL
                   THEN vAD1=ADDRESS_LINE1, vAD2=ADDRESS_LINE2, vAD3=CITY||STATE||ZIP
                   ELSE vAD1=ADDRESS_LINE1, vAD2=ADDRESS_LINE2, vAD3=ADDRESS_LINE3, vAD4=CITY||STATE||ZIP
                   ENDIF
              ENDIF     
         ENDIF          
    ENDIF               
    This what I've got so far...
    
    DECLARE
      vADR1
      vADR2
      vADR3
      vADR4
    BEGIN
    SELECT
    DECODE(
    
    END;
    /

    Hello

    Interplay says:
    ...
    Here's the script:

    WITH got_delimited_list AS
    (
    SELECT address_line1 || ' +' ||
    address_line2 || ' +' ||
    address_line3 || ' +' ||
    ...
    

    This is equivalent to

    SELECT  (address_line1 || ' ')    || '+' ||
         (address_line2 || ' ')    || '+' ||
         (address_line3 || ' ')    || '+' || ...
    

    You are guaranteeing to all areas will result in a space, and therefore may not be NULL.
    Lose the spaces before the signs +:

    SELECT  address_line1 || '+' ||
         address_line2 || '+' ||
         address_line3 || '+' || ...
    

    Published by: Frank Kulash on Feb 3, 2010 10:04
    Sorry, my fault. My original post had this error.

  • Need help in writing the SQL CASE or DECODE statement

    Hi experts,

    I need to write a SQL select order_num, cntry_cde, prod_id and Qty by joining order_num on PROD_ORDER and PROD_ORDER_TXT.

    Here is my sample data

    PROD ORDER_
    order_num Prod_id Qty cntry_cde
    100 US A1 5
    101 US 10 A2
    102 IN A3 4
    103 TO THE A4 9
    104. IN A5 3

    PROD ORDER_TXT_
    cntry_cde Prod_id order_num
    100 US A1
    101 US A2
    102 NZ A3
    103 TO THE A4
    A5 104

    Here's the requirement,

    (1) if the cntry_cde in PROD_ORDER is the same as cntry_cde in PROD_ORDER_TXT then select PROD_ORDER.cntry_cde (orders 100, 101, 103)
    (2) if they are different, choose PROD_ORDER_TXT (order 102, to THE NZ <>) country code
    (3) if they are different and PROD_ORDER_TXT.cntry_cde is null, I can't use it like cntry_cde in my report (order 104). It happenend just because of bad data to the source.
    I can't avoid it. Then just use the cntry_cde of PROD_ORDER

    Expected results
    100 US A1 5
    101 US 10 A2
    102 NZ A3 4 - changed in NZ
    103 TO THE A4 9
    104. IN A5 3 - IN retained as PROD_ORDER_TXT.cntry_cde is null


    instructions for creation and insertion of sample table are lower than

    create the table prod_order
    (number of order_num,
    cntry_cde CHAR (2),
    prod_id VARCHAR2 (6).
    number of quantity)

    create the table prod_order_txt
    (number of order_num,
    cntry_cde CHAR (2),
    prod_id VARCHAR2 (6))

    insert into prod_order values (100, 'WE', 'A1', 5);
    insert into prod_order values (101, 'WE', 'A2', 1);
    insert into prod_order values (102, ' to THE ', 'A3', 4);
    insert into prod_order values (103, ' to THE ', 'A4', 9);
    insert into prod_order values (104, 'IN', 'A5', 3);



    insert into prod_order_txt values (100, 'WE', 'A1');
    insert into prod_order_txt values (101, 'WE', 'A2');
    insert into prod_order_txt values (102, 'NZ', 'A3');
    insert into prod_order_txt values (103, ' to THE ', 'A4');
    insert into prod_order_txt values (104, 'A5', NULL);

    commit;

    Thank you for your help in advance

    Published by: manon March 28, 2012 13:39
  • get updated with the help of decode error

    Hi gurus,

    Your help is greatly appreciated.

    IAM seen to deliver to decode using the below the update statement.

    Can someone please help what Miss me here.

    varSTMT: = "UPDATE PROD. PROCESS_COUNTER ';
    varSTMT: = varSTMT | "SET LAST_COUNT_ADDED =" decode ('(change_date) trunc, trunc (sysdate), last_count_added + 1, 1) "';
    varSTMT: = varSTMT | "WHERE NOM_PROCESSUS ="DAILY_FILE"';

    We know don't no what should look like your update statement, but the quotes are really'm. Assuming that update should be:

    UPDATE PROD. PROCESS_COUNTER SET LAST_COUNT_ADDED = decode (trunc (change_date), trunc (sysdate), last_count_added + 1, 1) WHERE nom_processus = 'DAILY_FILE. '

    change:

    varSTMT: = varSTMT | "SET LAST_COUNT_ADDED =" decode ('(change_date) trunc, trunc (sysdate), last_count_added + 1, 1) "';

    TO

    varSTMT: = varSTMT | ' SET LAST_COUNT_ADDED = decode (trunc (change_date), trunc (sysdate), last_count_added + 1, 1)';

    SY.

  • Please help - spell decoder problem

    Hello

    I have problems with an assignment for a segment of decoder display 7 in hexadecimal. Everthing works except when I get 0010 binary which should display the number 2 on the 7 segment display I get a light on the segment f. I checked all my doors and Karnaugh maps on the multisim circuit, but could not find the error. I have attached the file if someone has the time to take a look. Thanks for any help or advice you can give me.

    Doorway AND U42 is BA'. You want this '. See attachment.

    Digital guy

  • Help to decode/case

    Hi all

    Can I use function decode/inner carton of a decoding function?

    {code}

    SELECT TO_CHAR)

    () EDMS_STRAGG_WC

    DISTINCT DECODE)

    EQS.attrib_code,

    'PRODUCT_AUTHORIZATION', ' permission: '

    || CASE eqs.qual_value

    WHEN "LIST".

    THEN

    (SELECT lookup_desc

    OF edmsadm.edms_lookup

    WHERE lookup_type =

    'PARTNER_AUTHORIZATION '.

    AND lookup_code =

    EQLS.list_value)

    ON THE OTHER

    (SELECT lookup_desc

    OF edmsadm.edms_lookup

    WHERE lookup_type =

    'PARTNER_AUTHORIZATION '.

    AND lookup_code =

    EQS.qual_value)

    END,

    'PRODUCT_CERTIFICATION', ' Certification: '

    || CASE eqs.qual_value

    WHEN "LIST".

    THEN

    EQLS.list_value

    ON THE OTHER

    EQS.qual_value

    END,

    'PRODUCT_SPECIALIZATION', ' specialization: '

    || (SELECT lookup_desc

    OF edmsadm.edms_lookup

    WHERE lookup_type =

    'PARTNER_SPECIALIZATION '.

    AND lookup_code =

    CASE eqs.qual_value

    WHEN "LIST".

    THEN

    EQLS.list_value

    ON THE OTHER

    EQS.qual_value

    END)))

    program_value

    Of edms_qual_stg EQS edms_qual_list_stg eqls

    WHERE 1 = 1

    AND eqs.qual_id = eqls.qual_id (+)

    AND eqs.req_id = 192647

    AND eqs.disc_line_id = 598631

    AND IN eqs.attrib_code

    ("PRODUCT_CERTIFICATION",

    "PRODUCT_AUTHORIZATION,"

    "PRODUCT_SPECIALIZATION");

    {code}

    Edms_qual_stg:

    AND_OR_CONDITION

    ATTRIBUTE_SOURCE

    ATTRIB_CODE

    CREATED_BY

    CREATED_DT

    DISC_LINE_ID

    END_DT

    EXCLUDE_INCLUDE

    GROUP_AND_OR_CONDITION

    GROUP_CODE

    MAX_VALUE

    MIN_VALUE

    MODIFIED_BY

    MODIFIED_DT

    QUAL_APPL_PRECEDENCE

    QUAL_ID

    QUAL_OPERATOR

    QUAL_TYPE

    QUAL_VALUE

    REQ_ID

    START_DT

    Edms_qual_list_stg:

    ATTRIBUTE_SOURCE

    ATTRIB_CODE

    CREATED_BY

    CREATED_DT

    END_DT

    INCLUDE_AFFILIATES

    INCLUDE_EXCLUDE

    LIST_VALUE

    MODIFIED_BY

    MODIFIED_DT

    PRIMARY_PARTY

    QUAL_ID

    QUAL_LIST_ID

    REFERENCE_ID

    START_DT

    Edms_lookup:

    CREATED_BY

    CREATED_DT

    DISPLAY_SEQ

    EDMS_LOOKUP_ID

    END_DATE

    LOOKUP_CODE

    LOOKUP_DESC

    LOOKUP_REFERENCE

    LOOKUP_TYPE

    MODIFIED_BY

    MODIFIED_DT

    START_DATE

    SELECT eqs.qual_id, eqs.disc_line_id, eqs.req_id, eqs.attrib_code, eqs.qual_value, eqls.list_value

    Of edms_qual_stg EQS edms_qual_list_stg eqls

    WHERE 1 = 1

    AND eqs.qual_id = eqls.qual_id (+)

    AND disc_line_id = 598631

    AND req_id = 192647

    AND IN eqs.attrib_code

    ("PRODUCT_CERTIFICATION",

    "PRODUCT_AUTHORIZATION,"

    "PRODUCT_SPECIALIZATION");

    7509575 598631 192647 PRODUCT_CERTIFICATION LIST

    7509575 598631 192647 PRODUCT_CERTIFICATION SILVER LIST

    7509576 598631 192647 PRODUCT_AUTHORIZATION ATP - JOULEX ESCO PROVIDER LIST

    7509576 598631 192647 PRODUCT_AUTHORIZATION ATP - JOULEX PROVIDER LIST IDENTIFY

    7509577 598631 192647 PRODUCT_SPECIALIZATION LIST ADVANCED SECURITY

    7509577 598631 192647 PRODUCT_SPECIALIZATION LIST EXPRESS FOUNDATION

    Power required:

    Certification: GOLD, SILVER, authorization: - JOULEX PROVIDER ESCO, ATP - ATP JOULEX PROVIDER IDENTIFIER, SPECIALIZATION: SECURITY ADVANCED, EXPRESS FOUNDATION.

    THX

    Rod.

    Hello

    Of course; an expression to DECODE or CASE that returns a NUMBER can be used anywhere a NUMBER is provided, including within another expression to DECODE or CASE.  A DECODE or CASE expression that returns that a DATE can be used almost anywhere, a DATE is scheduled, including within another expression to DECODE or CASE.  An expression to DECODE or CASE that returns that a VARCHAR2 can be used almost anywhere a VARCHAR2 is scheduled.  (There are a few situations where it is absolutely a string literal).

    There are not many situations where you really need to do this, however.  It is generally simpler and more effective to use a simple CASE expression; nesting is seldom necessary.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.

    Simplify the problem as much as possible, so that it contains only enough to show the part you don't already know how.

    If you really need a user-defined function to show the problem, and then include a CREATE FUNCTION statement to explain what the function.  Yet once again, simplify: If the function is not what you do not understand, post a problem that does not use the service.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002

  • concatenating whole so so otherwise - matter or decode statements

    Hello

    I have a table called t_criteria of columns 'criterion_1', 'criterion_2' and criterion_3' with line for each column being either 'Yes', 'No' or 'not known '. (See the DOF below)

    What I want is a statement that will give the number of criteria which have been fulfilled (i.e. the line 'Yes') in a list separated by commas in a column called 'criteria_met '.

    I know how to do this in excel but do not know how I would go about it in oracle?

    It is a way to do this in excel:

    "= SUBSTITUTE (TRIM (IF(B2="Yes",1,)" ") &" "& IF(C2="Yes",2,)" "") &"" & IF(D2="yes",3,) "" ")),""," ")"

    When column B is criterion_1, column C is criterion_2 and column D is criterion_3.

    I use the database 11g r2


    create the table t_criteria

    (the number (2) of site_id not null,)

    criterion_1 varchar2 (25).

    criterion_2 varchar2 (25).

    criterion_3 varchar2 (25).

    key primary constraint site_id_pk (site_id)

    );

    -----------------

    insert into t_criteria values (1, 'Yes', 'No', ' yes');

    insert into t_criteria values (2, 'Yes', 'No', "Ignore");

    insert into t_criteria values (3, 'Yes', 'No', ' yes');

    insert into t_criteria values (4, 'No', 'Yes', ' don't know');

    insert into t_criteria values (5, 'No', "Don't know", "Ignore");

    insert into t_criteria values (6, 'No', 'No', ' yes');

    insert into t_criteria values (7, 'No', "Don't know", "Ignore");

    insert into t_criteria values (8, 'Yes', 'No', "Ignore");

    insert into t_criteria values (9, 'Yes', 'No', "Ignore");

    insert into t_criteria values (10, 'Yes', 'No', "Ignore");

    insert into t_criteria values (11, 'No', 'No', "ignore");

    Hello

    Please try below script

    SELECT REPLACE (TRIM(' ')

    OF DECODE(criterion_1,'Yes',1,'')

    ||' '

    || Decode(criterion_2,'Yes',1,'')

    ||' '

    || (Decode(criterion_2,'Yes',1,'')), "","")

    OF t_criteria;

    Concerning

    Mr. Mahir Quluzade

  • Disqualification - CASE or DECODE statement writing

    Test

    Edited by: user4362313 may 3, 2013 05:00

    Hi Bala,

    If I interpreted the statement correctly, then you are wanting fill the digits left of the decimal point to four characters, so 12.345 becomes 0012.345.

    The best way to achieve this is by using a processor of Expression (see the online help for details of full syntax). Assuming that the input attribute is called 'col1' then the following expression should lead to the desired result:

    substr ('000' | col1, indexof (col1, ".") - 1).

    Kind regards
    Nick

  • Help - nested Case statement

    Hello everyone.  I'm having a hell of a time trying to understand my nested case statement.  It's pretty simple, but I always feel to get this error:

    ORA-00937: not a single group group function
    * 00937. 00000 - 'not a single-group function. "
    Cause:
    Action:

    However, when I try to enter in a "group by" I get this error:

    ORA-00979: not a GROUP BY expression
    * 00979. 00000 - 'not a GROUP BY expression. "
    Cause:
    Action:

    I don't know if there is something wrong with my nested case statement syntax, or miss me something more fundamental. This is my code:
    SELECT AE.EMP_ID,
      CASE
        WHEN EP.PHYSICAL_DATE IS NULL
        THEN
          CASE
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
            THEN 'NEEDS PHYSICAL'
            WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
            THEN 'COMING UP'
            ELSE 'No'
          END
        WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
        ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
        THEN 'NEEDS PHYSICAL'
        WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
        ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
        THEN 'COMING UP'
        ELSE 'No'
      END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID         = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL     = 1
    OR EP.PHYSICAL      IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID;
    I appreciate all help. Nice day.

    Aqua

    SELECT AE.EMP_ID,
    CASE
    WHEN EP.PHYSICAL_DATE IS NULL
    THEN
    CASE
    WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 365)
    THEN 'NEEDS PHYSICAL'
    WHEN EC.ORIGINAL_CONTRACT_START < ((SYSDATE) - 330)
    THEN 'COMING UP'
    ELSE 'No'
    END
    WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
    ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 365)
    THEN 'NEEDS PHYSICAL'
    WHEN MAX(EP.PHYSICAL_DATE) KEEP (DENSE_RANK LAST
    ORDER BY EP.PHYSICAL_DATE) < ((SYSDATE) - 330)
    THEN 'COMING UP'
    ELSE 'No'
    END "Needs Physical?"
    FROM AP AE
    LEFT JOIN EMP_PHYSICAL EP
    ON AE.EMP_ID = EP.EMP_ID
    LEFT JOIN POSITION_OFFERED PO
    ON AE.EMP_ID = PO.EMP_ID
    LEFT JOIN EMP_CONTRACT EC
    ON AE.EMP_ID = EC.EMP_ID
    WHERE PO.ACTUAL_END IS NULL
    AND (EP.PHYSICAL = 1
    OR EP.PHYSICAL IS NULL)
    AND :P71_EMP_ID = AE.EMP_ID;
    GROUP BY AE.EMP_ID,EP.PHYSICAL_DATE,EC.ORIGINAL_CONTRACT_START;

    
    

    Hi,

    You need to add Group by clause at the end of the query i have added above.

  • Need help to decode javascript tag for the release of HTML5.

    Hi all

    I'm working on a project in Adobe captivate 7 64 bit which consists of approximately 500 slides with most of the slides in text and image. The problem that I face is very unusual that I guess I'm the first to discover (according to my searches on google and the forums). So, after I publish my project the output works very well in html (local and online) BUT when I run index.html (i.e., out of HTML5) the course is not running and the screen is blank.

    After spending a week on the search online and using the strategy of trail and error, I was able to know that it was the text of the URL "F:\usrnew\purchase" placed in the middle of the course which caused damage of all. However, the url has been removed and the project has been submitted.

    After extra time, I discovered that the "\u" letter which is a JavaScript tag was causing the problem for the release of HTML5. I don't really know much to script, but discovered that the tag can be decoded using a programming strategy. Now, this is where my knowledge comes from a standby and needs a lift from you guys.

    Any ideas, help, sharing of knowledge would be very useful to me and all who could deal with this problem in the future.

    Looking forward for your point of view.

    Kind regards

    Mirza

    Voila! The problem is resolved.

    Solution: Change the single slash "------" to a double slash "\".

    See you soon,.

    Mirza

Maybe you are looking for