Function to compare IT0014

Hi All,
Can anyone help me with the operation that can be used to Query on the Date specification.
Thanks and Reagrds
Swati

Hi,
Try using Ad-Hoc Query.In the infoset query you get the option of reporting on date specifications.
Regards

Similar Messages

  • Function to compare particular value with LOV Additional Description column

    Hi,
    Is there an existing function that compares a value with the "Additional Description" of a particular LOV ?
    Can the comparison be done by "Adminstration - Personalization"?

    Sorry & thanks sathish,
    Now i got the result.
    SQL> select DECISIONED_STAGE_ID,DECISIONED_STAGE_USER_ID from naap10_application where APP_DECISION_DATE BETWEEN TO_DATE ('31.01.2007 00:00:00', 'DD.MM.YYYY HH24:MI:SS') AND TO_DATE ('31.01.2007 23:59:59', 'DD.MM.YYYY HH24:MI:SS')
    2 and application_id=2007010028552;
    DECISIONED_STAGE_ID DECISIONED_STAG
    2006060113 SYSTEM
    ================================
    But one doubt,
    When i created the column with the date datatype how it gets the time value,
    And in one environment db i got the result but in another environment i dont get,
    Shall i want to change any session status of date?

  • SQL Function to compare 2 strings

    Hi All
    Is there any SQL function to compare 2 strings?

    If you are looking for a character by character comparison then you would have to do something like...
    SQL> ed
    Wrote file afiedt.buf
      1  WITH T AS (select 'THIS IS MY 1ST STRING' string1, 'THIS IS MY 2ND String Bob' string2 from dual)
      2  --
      3  select s1ch, s2ch, decode(s1ch,s2ch,'Match','Mismatch') as compare
      4  from (
      5        select rn, substr(string1,rn,1) as s1ch, substr(string2,rn,1) as s2ch
      6        from t, (select rownum rn from t connect by rownum <= greatest(length(string1), length(string2)))
      7       )
      8* order by rn
    SQL> /
    S S COMPARE
    T T Match
    H H Match
    I I Match
    S S Match
        Match
    I I Match
    S S Match
        Match
    M M Match
    Y Y Match
        Match
    1 2 Mismatch
    S N Mismatch
    T D Mismatch
        Match
    S S Match
    T t Mismatch
    R r Mismatch
    I i Mismatch
    N n Mismatch
    G g Mismatch
        Mismatch
      B Mismatch
      o Mismatch
      b Mismatch
    25 rows selected.
    SQL>

  • PL/SQL Pipelined Function to Compare *ANY*  2 tables

    I am trying to create a pipelined function in 10g R1 that will take the name of two tables, compare the the tables using dynamic SQL and pipe out the resulting rows using the appropriate row type. The pipelined function will be used in a DML insert statement.
    For example:
    create table a (f1 number, f2, date, f3 varchar2);
    create table b (f1 number, f2, date, f3 varchar2);
    create table c (f1 number, f2, date, f3 varchar2);
    create or replace TYPE AnyCollTyp IS TABLE OF ANYTYPE;
    create or replace TYPE CRowType IS c%ROWTYPE;
    create or replace TYPE CRowTabType IS table of CRowType;
    CREATE OR REPLACE FUNCTION compareTables (p_source IN VARCHAR2, p_dest IN VARCHAR2)
    RETURN AnyCollTyp PIPELINED
    IS
    CURSOR columnCur (p_tableName IN user_tab_columns.table_name%TYPE)
    IS
    SELECT column_name, column_id
    FROM user_tab_columns
    WHERE table_name = p_tableName
         ORDER BY column_id;
    l_cur sys_refcursor;
    l_rec ANYTYPE;
    l_stmt VARCHAR2 (32767);
    BEGIN
    l_stmt := 'select ';
    FOR columnRec IN columnCur (p_dest)
    LOOP
    l_stmt := l_stmt || CASE
    WHEN columnRec.column_id > 1
    THEN ','
    ELSE ''
    END || columnRec.column_name;
    END LOOP;
    l_stmt := l_stmt || ' from ' || p_source;
    l_stmt := l_stmt || ' minus ';
    l_stmt := l_stmt || ' select ';
    FOR columnRec IN columnCur (p_dest)
    LOOP
    l_stmt := l_stmt || CASE
    WHEN columnRec.column_id > 1
    THEN ','
    ELSE ''
    END || columnRec.column_name;
    END LOOP;
    l_stmt := l_stmt || ' from ' || p_dest;
    OPEN l_cur FOR l_stmt;
    LOOP
    FETCH l_cur
    INTO l_rec;
    PIPE ROW (l_rec);
    EXIT WHEN l_cur%NOTFOUND;
    END LOOP;
    CLOSE l_cur;
    RETURN;
    END compareTables;
    The pipelined function gets created without error. However, the testCompare procedure gets an error:
    SQL> create or replace procedure testCompare is
    begin
    insert into c
    select *
    from (TABLE(CAST(compareTables('a','b') as cRowTabType)));
    dbms_output.put_line(SQL%ROWCOUNT || ' rows inserted into c.');
    end;
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TESTCOMPARE:
    LINE/COL ERROR
    3/4 PL/SQL: SQL Statement ignored
    5/47 PL/SQL: ORA-22800: invalid user-defined type
    Does anyone know what I am doing wrong? Is there a better way to compare any two tables and get the resulting rows?

    904640 wrote:
    Hi All,
    Is it possible to post messages to weblogic JMS queue from pl/sql procedure/function?
    From this Queue, message will be read by OSB interface.
    Any help will be highly appreciated.
    http://www.lmgtfy.com/?q=oracle+pl/sql+weblogic+jms+queue

  • The loss of functionality of Compare Documents in Acrobat.

    The Compare Documents function in Acrobat 9 is now useless to my department. I am currently a Graphic Designer/ Tech Writer who writes operator manuals and had always used Compare Documents function to find the differences in the documents (mostly textual differences). Then we updated and lost this functionality altogether. Now, the only comparison option allowed is "Scanned Documents," which treats the documents as pictures and only looks for the differences of the over-all page. I would like the old textual comparison function restored. I would have mentioned something sooner, but I was hoping this was just an accident and would be fixed in a future patch

    This would be better handled in the Acrobat forum. The compare document works more effectively now that you are given three choice:
    You choose if the documents are (a) Reports, spreadsheets, magazine layouts, (b) Presentation decks, drawings, or illustrations, or scanned documents. You are not limited to scanned documents. If that is all you are seeing please repost in the Acrobat Windows or Acrobat Mac forum, report your version of Acrobat, your OS, and perhaps a screen shot of what you are seeing. Note, I get three options as above and I am not restricted to Scanned documents.

  • Function to compare tow dates and set the value

    Hi All,
     I have two dates with close date and Due date.And i want to set the value as 1 if close date is less then or equal to to due date else 0 .And my other condition is to set  1 when close date is greater the due date.Can any one help me how can I
    achieve it.
    Thanks, Sid

    Hello Sid,
    For this you can use a simple IF Statement with a compare on the Dates:
    = If(Tabelle1[CloseDate] <= Tabelle1[DueDate]; 1; 0)
    = IF(Tabelle1[CloseDate] > Tabelle1[DueDate]; 1; 0)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Function to compare 2 expressions

    Can you please any one give the expression to be used in sql to find out the small value in the 2 expressions given.

    LEAST('apples', 'bannana', 'carrots')
    RETURNS 'apples'
    LEAST(1, 2, 3)
    RETURNS 1
    LEAST will be the function you require but remember that if you have a NULL value in your data this will return as your LEAST value.
    LEAST('apples', 'bannana', 'carrots', NULL)
    RETURNS NULL

  • Sql table function that compares two tables column structure and returns each difference as a record in the returned table

    hi,
    Does anyone have or can show me the principle of a such kind of function ?

    see
    http://geekswithblogs.net/leonardm/archive/2010/01/14/table-schema-comparison-in-sql-server.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Regarding function that compare with users

    hello
    actually i have stno(12) in student table and i have created user named by the same stno(12) so i want to create function that allow only this user 12 to access to all data in student table and i want to di policy for that because i am confued about object_schema what i should writ here
    can any body help me?

    889890 wrote:
    hello
    actually i have stno(12) in student table and i have created user named by the same stno(12) so i want to create function that allow only this user 12 to access to all data in student table and i want to di policy for that because i am confued about object_schema what i should writ here
    can any body help me?which schema owns STUDENT table?
    when all else fails Read The Fine Manual
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25789/cmntopc.htm#i2332

  • Document Compare Function in Acrobat Professional 9

    Document Compare function
    I use the 'compare' function to compare documents versions etc for changes. It looks like only 250 pages is the maximum number of pages that can compared during each operation.
    I am using documents that are 900+ pages and I keep the error message/screenshot attached. 
    Is this a limitation with Acrobat Professional 9?

    Yes, it would appear to be a limitation that Adobe have put in. I'm in a similar situatiion where I have documents up to 2500 pages long that must be compared so while it takes longer I do the compare in batches of 250 pages at a time. It could be as a result of resource usage. I'm finding that when I do a compare, the fisrt one is generally ok but after that Acrobat slows down considerably - it may just be my computer (XP Pro 1.5 GB RAM and 2.8 GHz) but I'd like to know does Acrobat empty the cache or is the cache filling up after each compare and hogging resources?
    It's a great function but I wish it would work the way I expect it to.
    Cheers

  • Error -3016 when trying to compare a column value via "decode" function

    The following statement:
      select * from turbine_user
      where login_name  = decode(1, 2,  'name1', 'name2')
    yields a "-3016 Invalid numeric constants" error.
    OTOH, the following variations work as expected:
      (a)
      select * from turbine_user
      where login_name  = 'name1'
      (b)
      select * from turbine_user
      where login_name  = 'name2'
      (c)
      select * from turbine_user
      where 'name1'  = decode(1, 2,  'name1', 'name2')
      (d)
      select decode(1, 2,  'name1', 'name2') from turbine_user
    Does MaxDB have problems with using the decode function to compare something to column values?
    My MaxDB-Version: 7.6.03.07
    Thanks in advance,
    Alex
    Edited by: Alexander Zimmer on Feb 6, 2008 3:53 PM

    Hi,
    unfortunately I assume that I should explain the doing of decode a little bit:
    As we see in the reference manual:
    DECODE(<check_expression>,<search_and_result_spec>,...[,<default_expression>])
    <check_expression> ::=
      <expression>
    <search_and_result_spec> ::=
      <search_expression>,<result_expression>
    <default_expression> ::=
      <expression>
    <search_expression> ::=
      <expression>
    <result_expression> ::=
      <expression>
    Ok, that will mean, that the first parameter of decode will be compared to parameter number 2, 4, 6, 8, 10,... up to number n-1.
    If the result of the comparison is true with parameter number x, the result of decode will be the value of parameter x+1.
    If no comparison results in 'equal', then NULL will be returned if there is an odd number of parameters respectively the value of the last parameter if there is an even number of parameters of the decode function.
    In your context, this means, that 1 is compared to 2 (always false), thus returning 'name2' always. Therefore I do not understand what you want to do with that decode.
    Ok, if we assume that the select sent is only a short form of what you really want to do, then I have to apologize, but there is a bug in the kernel coding. It will be fixed ASAP.
    To be able to work until then, put the function DIGITS around your 1 and around the 2 (or the corresponding real parameter values) and it should do.
    BTW: with column on the left hand side, the error occurs and with a string literal it does not? This is different to my check where both values on the left side cause this error to occur.
    Elke

  • Is there any in-built function for date compare?

    I need function which compare dates?

    Hi,
    You can simply use > , <,etc.,
    Check this sample code.
    data : d1 type RM06B-EEIND ,
           d2 type sy-datum.
    d1 = sy-datum.
           CALL FUNCTION 'DATE_IN_FUTURE'
             EXPORTING
               anzahl_tage                   = '-7'
               import_datum                  =  d1
            IMPORTING
              EXPORT_DATUM_EXT_FORMAT       =  d2
              EXPORT_DATUM_INT_FORMAT       =  d2
    if d1 < d2.
    write 'h'.
    endif.

  • Decode Function issue

    Hi all,
    i want compare two rows in a table. so i used decode function to compare the values, whether its matched or not.
    One of my table column has Long data type.
    Decode(a.col1,b.col1,'Match','NotMatch')
    col1 - is long data type.
    when i use long data type, i got below error,
    is there anyway to rectify this error.
    SQL Error: ORA-00932: inconsistent datatypes: expected NUMBER got LONG
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    Thanks in advance.
    Regards,
    Santhosh

    >
    You can't use ANY function on a LONG column. This restriction is not limited to DECODE.
    >
    Not quite correct.
    You can use TO_LOB on a LONG column but only in the select list of a subquery in an INSERT statement.
    See TO_LOB in the SQL Language doc
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions205.htm#SQLRF06134
    >
    TO_LOB converts LONG or LONG RAW values in the column long_column to LOB values. You can apply this function only to a LONG or LONG RAW column, and only in the select list of a subquery in an INSERT statement.
    Before using this function, you must create a LOB column to receive the converted LONG values. To convert LONG values, create a CLOB column. To convert LONG RAW values, create a BLOB column.
    You cannot use the TO_LOB function to convert a LONG column to a LOB column in the subquery of a CREATE TABLE ... AS SELECT statement if you are creating an index-organized table. Instead, create the index-organized table without the LONG column, and then use the TO_LOB function in an INSERT ... AS SELECT statement.
    You cannot use this function within a PL/SQL package. Instead use the TO_CLOB or TO_BLOB functions.

  • Possible to write a function that takes any type as parameter ?

    I need to write a function that will take 2 parameters ( of any type - VARCHAR etc ) and return a boolean.
    ( Im trying to write a function that will do NULL processing.
    something like..
    if ( P1=P2 OR ( P1 IS NULL AND P2 IS NULL ) ) then
    return true ;
    end if;
    return false ;
    the function simply compares its parameters P1 & P2 and returns true if they are equal - including if both are NULL
    Is this possible to write at all.
    My code looks very ugly without this being wrapped in a function.

    You may be able to use SYS.AnyData for this. However, dealing with the data would be confusing, so overloading the FUNCTION would most likely be a better idea.
    This doesn't work, but it looked like fun, so i tried:
    CREATE OR REPLACE FUNCTION Equal_Or_NULL(A SYS.AnyData, B SYS.AnyData)
    RETURN PLS_INTEGER
    AS
    Local_A     VARCHAR2(4000);
    Local_B     VARCHAR2(4000);
    Junk          PLS_INTEGER;
    BEGIN
    IF A IS NULL AND B IS NULL THEN RETURN 1; END IF;
    CASE A.GetTypeName
      WHEN 'SYS.NUMBER'     THEN Junk := A.GetNumber(Local_A); Junk := B.GetNumber(Local_B);
      WHEN 'SYS.DATE'     THEN Junk := A.GetDate(Local_A); Junk := B.GetDate(Local_B);
      WHEN 'SYS.CHAR'     THEN Junk := A.GetCHAR(Local_A); Junk := B.GetCHAR(Local_B);
      WHEN 'SYS.VARCHAR'     THEN Junk := A.GetVARCHAR(Local_A); Junk := B.GetVARCHAR(Local_B);
      WHEN 'SYS.VARCHAR2'     THEN Junk := A.GetVARCHAR2(Local_A); Junk := B.GetVARCHAR2(Local_B);
    END CASE;
    RETURN CASE WHEN Local_A = Local_B THEN 1 ELSE 0 END;
    END Equal_Or_NULL;
    /Overloading would be much simpler, as the arguments could be directly compared.
    IMO, Do not do this. Hiding logic in a FUNCTION it for cosmetic purposes is a bad idea.

  • Lack of flexibility in the format PLSQL functionality

    Hi,
    Is there any plans to increase the functionality of the format PLSQL function? Compared to TOAD, it is extremely limited. The TOAD formatter alone is enough to keep our organization from switching to SQL Developer.
    Darryl

    You got that in bold: it's announced on this forum and on sqldev's homepage... http://htmldb.oracle.com/pls/otn/f?p=42626:37:260789750723810::NO:::

Maybe you are looking for

  • Cancelled invoice not transfered to accountding due to Forign trade data is

    HI, We have problem with Cancelled invoice number. Scenerio is like below. We have already created the invoice number from the Delivery ( consignmnet Delivery) User by mistake cancelled the invoice and also cancelled the respective Delivey  number. N

  • How do i know if row has been updated?

    Hi Please can someone guide me on how I can determine if my update has been successful. I am currently using the method below but my data is being put into the table but the method rowUpdated() returns false when it should return true. rs.moveToInser

  • Iphone 6 Blue Tooth Pairing with my 2011 Tundra

    My Tundra will not pair effectively with my new iPhone 6...I have the latest software update 8.0.2.  It will play audio (Music) but will pair with phone audio.   What needs to happen here now? My 4S worked fine.

  • How to upgrade Apex 2.2 to Apex 3.1

    Dear all please Mention the Procedure for Upgrading Apex 2.2 to Apex 3.1 I am using Apex 2.2 , Oracle 10g on Windows 2000 Server thanks Alot Edited by: khaja on Jan 18, 2009 11:09 AM

  • ORA -1031 Error while connecting to RMAN, RMAN connection

    Hi Guru's I am getting the above mentioned error when trying to connect to RMAN. I recreate the password file as well. and check the user is a part of dba group As i am going to connect with user sys so the user have all the required privileges. Can