Range comparison using VARCHAR2

Hi
How can I achieve
SELECT * FROM TABLE WHERE 'B' BETWEEN 'A' AND 'C'
How do I obtain a number representation for a given character string?

Oracle can do a sort on varchar2 (sorting order depends on NLS_LANG settings), so there is no need to convert:
SQL> select 'A'
  2  from dual
  3  where 'Y' between 'X' and 'Z'
  4  ;
'A'
AHowever, with select ascii('A') from dual; you can get the ASCII number of a 'A' (for example).

Similar Messages

  • Range Partitioning on Varchar2 column???

    We hava table and it has a date column and its type is varchar2.
    This column's format is '16021013' ('ddmmyyyy').
    We want to make range partition on this column. What will be the best way?
    do you think virtal column partitioning will be efficient?

    >
    I'm not a new DBA:-) You can be sure. I asked only about range partitioning trick with varchar2 column because we did our examination about this table. We will need to archive this table quarter by quarter to the other archive database. Then, off course, nearly all queries are coming firstly by using this date column and they can have different filtering inside "where" conditions. Already, this table has index on this column but with huge number of data, index performance is not enough for us. This is a 7x24 banking system and we are lately joined to this project. Because of this, we cant change everything like changing data type of that column after this moment.
    >
    You are taking things way too personally. No one said anything about whether you were, or were not, a DBA or made any other comments about your skill or abilities.
    What we ask was for you to tell us WHAT the problem was that you were trying to solve and WHY you thought partitioning would solve it.
    And now, after several generic posts, you have finally provided that information. We can only comment based on the information that you post. We can't guess as to what types of queries you use or what kinds of predicates you use in those queries. But we need to know that information in order to provide the best advice.
    Next time you post put the important information in your original question:
    1. A table column is VARCHAR2 but contains a date value. We are unable to change the datatype of this column.
    2. We need to archive data quarterly based on this date value
    3. Nearly all queries use this date value and then also may have additional filter conditions
    4. This date column is indexed but we would like to improve the performance beyond what this index can give us.
    The above is a summary that includes all important information that is needed to know how best to help you.
    And I made a pretty good guess since two replies ago I provided you with example code that shows just how to partition the table.
    >
    Now, our only aim is how to make range partitioning this varchar2 date column.
    >
    As I showed you in my example code earlier you can add a virtual column to the table and partition on it. My example code creates a monthly partitioned table that allows you to archive by month or archive every three months to archive by quarter.
    You can modify that example to use quarterly partitions if you want but I would recommend that you use standard monthly partitions since they will satisfy the widest range of predicates.

  • TS1398 problem in wifi range i use my phone my rume but i think china mobile is working better than iphone ......

    problem in wifi range i use my phone my rume but i think china mobile is working better than iphone ......

    I don't understand what you are asking here. Can you try and ask again?

  • Create document number range 22 using internal number assignment

    Hi friends,
    now i am working upgradation project from 4.7 to 6.0. sandbox i created one Asset, After that i posed amount to that asset by using f-90.now i run depreceation in ABAF T code the bellow issue is comming
    Create document number range 22 using internal number assignment
         Message no. AA776
    Diagnosis
         Processing terminated because the document number range 22 for year 2011
         was set up with external number assignment.
    System Response
         For periodic posting of depreciation, you have to create a document
         number range with internal number assignment, since the document numbers
         are assigned from Financial Accounting.
    Procedure
         Change the number assignment for the number range 22 from external to
         internal in Customizing for Asset Accounting. See SAP Note 890976 for
         more information.
    But no ranges for that particular year having, if any changing that one it s not come edit or deleating
    ple any one help me
    Regards
    Gangadhar reddy

    Hi Gangadhar,
    after 4.6C the Internal Number Range was changed into external Number Range due to technical requirements.                                                                               
    As the error messages due to posting manual into the affected  number ranges could not be hindered in this case with ERP2005 the desicion was made to rechange to internal number range. Note 890976 describe what to do here.                             
    regards Bernhard

  • Max. records in Range table used in Select .. IN  ?

    Hi
    Does somebody knows wich is the max. amount of records in a RANGES table used in Select Comand:
        select xxxx FROM  table
        where  field  IN  range_table.
    That, because i found severeal times programs aborting for this cause, so i changed this condition to an ALL ENTRIES.
    Regards
    Frank

    It really depends on the table and DB settings.
    Check with your DBA folks.
    On our system it's ~ 400-500 for most of the tables.
    NOTE: as it depends on DB settings - it may be different on your development system and on your production system.
    For all entries does ntohave this limitation as it's being split into several selects, you can see it in the trace.

  • Create document number range 03 using internal number assignment in AFAB

    Hi Experts,
    Where i have to create number range to Depreciation Posting ? Please mentain Transaction code .
    I had check T Code:AS08 (No Tick is assign)  & FBN1 (Intrenal Tick is assign)
    I am doing T Code AFAB
    Folowing error coming
    Create document number range 03 using internal number assignment
    Message no. AA776
    Diagnosis
    Processing terminated because the document number range 03 for year 2011 was set up with external number assignment.
    System Response
    For periodic posting of depreciation, you have to create a document number range with internal number assignment, since the document numbers are assigned from Financial Accounting.
    Procedure
    Change the number assignment for the number range 03 from external to internal in Customizing for Asset Accounting. See SAP Note 890976 for more information.
    Waiting for reply
    Regards,
    Girish

    locked.  please read the error message and search the IMG (very easy).

  • Port range being used by Airport Express?

    I am trying (so far unsuccessfully) to connect my airport express to my belkin wireless network to use Airtunes.
    Belkin support tells me that I need to find out what port range the airport express is using and open that range up using the router admin.
    I cannot find that info anywhere. Can anyone provide this
    information?
    Thanks
    Dell Precision   Windows 2000   SP4 belkin wireless router

    all I can do is click "Other..." button, which then asks me for an IP address and password. I'm not sure what to enter on that screen.
    Since you connected the AX directly to your Belkin router, it's going to be assigned a private IP address from the the router's DHCP service...and why the status light is green. I'm not sure why you're not able to see the AX in the AirPort Admin Utility.
    When using the "Other..." option, you will need to enter the IP address of the AX...which, by default, is 10.0.1.1, but is now different. The default password is "public."
    Can you connect directly from your computer, using an Ethernet cable between your computer & the AX, just for the set up phase? If so, then run the AirPort Admin Utility and see if you can now "see" the AX.
    Mac Mini Intel Core Duo   Mac OS X (10.4.8)   1.66 GHz 1 GB RAM 100 GB HD

  • While doing comparison using SDK received a warning message

    Hi,
    While doing comparison using Adobe Acrobat 8 SDK - receiving a warning message "The Organizer database is damaged and will be reset the next time Acrobat is launched. Quit the application and close any currently opened web browsers."
    Can any body help me how to rectify the above problem?
    Thanks,
    Sudhakar
    Note: I have reparied the Acrobat professional but still the problem not solved.

    Dear Chaka,
    If my understanding is correct normally even after setting the TECO status set,you can do confirmations,and you can issue
    components against the order.
    After technical completion you can still make postings for the order. For instance, material withdrawal or a confirmation can be
    posted if they were previously forgotten.
    Check this link
    http://help.sap.com/saphelperp60_sp/helpdata/en/a3/664a3397e311d1b5a70000e8359890/content.htm_
    But generally in order to block the confirmation or goods movement for a TECO status set order,we can either an user Exit or
    else block it using the settings in BS22- System status.
    But you check this BADI - WORKORDER_UPDATE using the method at save or else withi this REORG_STATUS_ACT_CHECK
    Check and revert
    Regards
    S Mangalraj

  • Range partiotion using interval partitioning

    Hi all,
    I am trying to create a partitioned table so that a number (which date converted to number ) partition is created on inserting a new row for release_date column.
    But please note that release_date column is having number data type (as per design) and people want to create an interval based partition on this.
    Any work around for this?
    They want data type NOT to be altered.
    create table product(
    prod_id number,
    prod_code varchar2(3),
    release_date number)
    partition by range(release_date)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
    (partition p0 values less than (20120101))
    Thanks in advance

    >
    I am trying to create a partitioned table so that a number (which date converted to number ) partition is created on inserting a new row for release_date column.
    But please note that release_date column is having number data type (as per design) and people want to create an interval based partition on this.
    >
    You can't use interval partitioning on the NUMBER column but you can add a VIRTUAL column based on it that uses DATE datatype.
    create table product(
    prod_id number,
    prod_code varchar2(3),
    release_date number,
    rel_date DATE as (to_date(to_char(release_date), 'yyyymmdd')) VIRTUAL
    partition by range(rel_date)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
       partition p0 values less than (to_date('20120101', 'yyyymmdd'))
    )The virtual column is a metadata only column (i.e. no data is stored for it).
    NOTE: you will need to modify your queries to use the 'REL_DATE' column in order to get partition pruning:
    insert into product (prod_id, prod_code, release_date) values (1,'abc', 20110502)
    insert into product (prod_id, prod_code, release_date) values (1,'abc', 20120502)
    -- this query does NOT prune
    select * from product where release_date < 20120101
    |   0 | SELECT STATEMENT    |         |     1 |    38 |     4   (0)| 00:00:01 |       |       |
    |   1 |  PARTITION RANGE ALL|         |     1 |    38 |     4   (0)| 00:00:01 |    1 |1048575|
    |*  2 |   TABLE ACCESS FULL | PRODUCT |     1 |    38 |     4   (0)| 00:00:01 |    1 |1048575|
    -- this query DOES prune
    select * from product where rel_date < to_date('20120101', 'yyyymmdd')
    |   0 | SELECT STATEMENT       |         |     1 |    38 |     3   (0)| 00:00:01 |       |       |
    |   1 |  PARTITION RANGE SINGLE|         |     1 |    38 |     3   (0)| 00:00:01 |     1 |     1 |
    |*  2 |   TABLE ACCESS FULL    | PRODUCT |     1 |    38 |     3   (0)| 00:00:01 |     1 |     1 |

  • ORA-13000: dimension number is out of range when using SDO_GEOM.RELATE

    Dear everyone
    I am attempting to workout which polygons cover the same area in order to determine distinct polygons. This is so I can then have just one copy of a polygon to a new table and delete all the duplicate polygons in the current table.
    I ran the following first to check something:
    SELECT SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'DETERMINE',
        B.geographical_coordinates,
        0.05) relationship
    FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL;but got the error message:
    Error starting at line 1 in command:
    SELECT DISTINCT A.mi_prinx,
    SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'EQUAL',
        B.geographical_coordinates,
        0.05)
    FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    Error report:
    SQL Error: ORA-13000: dimension number is out of range
    ORA-06512: at "MDSYS.SDO_GEOM", line 70
    ORA-06512: at "MDSYS.SDO_GEOM", line 2647
    13000. 00000 -  "dimension number is out of range"
    *Cause:    The specified dimension is either smaller than 1 or greater than
               the number of dimensions encoded in the HHCODE.
    *Action:   Make sure that the dimension number is between 1 and the maximum
               number of dimensions encoded in the HHCODE.I then tried the following:
    SELECT DISTINCT A.mi_prinx,
    SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'EQUAL',
        B.geographical_coordinates,
        0.05)
    FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULLwhich produced the following error message:
    Error starting at line 1 in command:
    SELECT
    SDO_GEOM.RELATE
    (A.geographical_coordinates,
    'EQUAL',
    B.geographical_coordinates,
    0.05) relationship
      FROM MAP_INDEX A,
           MAP_INDEX B
    Error report:
    SQL Error: ORA-13050: unable to construct spatial object
    ORA-06512: at "MDSYS.SDO_3GL", line 4
    ORA-06512: at "MDSYS.MD2", line 771
    ORA-06512: at "MDSYS.SDO_GEOM", line 2622
    ORA-06512: at "MDSYS.SDO_GEOM", line 2649
    13050. 00000 -  "unable to construct spatial object"
    *Cause:    This is an internal error.
    *Action:   Contact Oracle Support Services.Does anyone have any idea as to what I might doing wrong? The original polygons were created in MapInfo Professional 8 and I am working in 10.2g
    I believe Imust be doing something wrong. I looked into SDO_GEOM_VALIDATE but again that produce the same error message as the first one. I have previously created a spatial index and inserted the values into the USER_SDO_GEOM_METADATA view.
    I have been able to get the following to work, I was testing out examples online just to see if I could produce a result on an sdo function:
    SELECT NAME_OF_FEATURE, SDO_GEOM.SDO_AREA(GEOGRAPHICAL_COORDINATES,M.DIMINFO)
    FROM MAP_INDEX, user_sdo_geom_metadata M
    WHERE M.TABLE_NAME='MAP_INDEX' AND M.COLUMN_NAME='GEOGRAPHICAL_COORDINATES'
    AND geographical_coordinates is not null;When I drew my polygons in MapInfo, they are likely to have gone partly outside of the boundary dimension values inserted in USER_SDO_GEOM_METADATA. Is that likely to be the cause of my problems or something else?
    If it is the cause, is there away of setting up Oracle or MapInfo so that anything drawn outside of the dimension area is clipped.
    Kind regards
    Tim

    Hi Tim,
    Since Oracle 8.1.6 Oracle has suggested the use of 4 digit SDO_GTYPE values, which encode the number of dimensions in the geometry. Examples of 4 digit SDO_GTYPES include 2001 for a 2D point, 3001 for a 3D point, 2002 for a 2D linestring, 3002 for a 3D linestring, 2003 for a 2D polygon and 3003 for a 3D polygon.. Contrast these with single digit values of 1 for a point, 2 for a linestring, and 3 for a polygon.
    My guess is that at least some of your data is loaded using single digit SDO_GTYPE values, and in the function Oracle does not know the dimensionality of the data (is a vertex identified by 2, 3, or four numbers?). You can check this by doing a:
    select distinct a.geographical_coordinates.sdo_gtype from MAP_INDEX A;
    If any of the values returned are single digit values then you will know this is the problem.
    You have a few options.
    You can have Oracle automatically fix the data by migrating the data:
    execute sdo_migrate.to_current('MAP_INDEX','GEOGRAPHICAL_COORDINATES');
    This will not only set the SDO_GTYPE correctly but will also fix any ring rotation problems (ensures exterior rings are stored counter-clockwise, and interior rings are stored clockwise), it will fix ring ordering problems (ensuring an exterior ring is followed by its interior rings), and it will appropiately set values in the SDO_ELEM_INFO_ARRAY.
    After you do this you should be good to go. However, if you are using a tool to update the data and it resets the information back, then the problem will continue to plague you. You should check with your vendor if that is the case.
    Another option is to change the query to a different signature which uses the SDO_GEOM_METADATA to get the dimensionality of the data. Instead of writing the query as you have, you would change it to:
    SELECT SDO_GEOM.RELATE
    (A.geographical_coordinates,
    C.DIMINFO,
    'DETERMINE',
    B.geographical_coordinates,
    C.DIMINFO) relationship
    FROM MAP_INDEX A,
    MAP_INDEX B,
    USER_SDO_GEOM_METADATA C
    WHERE A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    and C.TABLE_NAME='MAP_INDEX'
    and C.COLUMN_NAME='GEOGRAPHICAL_COORDINATES';
    So either of those should fix the problem you are seeing, but neither of those are the best way to accomplish what you want to do.
    If I were you I would follow first set of directions (migrate your data), make sure I have a spatial index on my table:
    select index_name
    from user_sdo_index_info
    where table_name='MAP_INDEX';
    If no rows are returned, create the index:
    create index MAP_INDEX_SIDX on MAP_INDEX(GEOGRAPHICAL_COORDINATES)
    indextype is mdsys.spatial_index;
    You could use SDO_JOIN to perform a self-join:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/sdo_operat.htm#BGEDJIBF
    using the EQUAL mask. Note the section on optimizing self-joins.
    If you don't have too much data, this might be a start to doing what you want:
    create table dups_rowids as
    select /*+ ordered */ a.rowid rowid1,b.rowid rowid2
    from MAP_INDEX A,
    MAP_INDEX B
    where SDO_EQUALS (a.geographical_coordinates,b.geographical_coordinates)='TRUE'
    and a.rowid <> b.rowid;
    create table nodup_rowid (noduprid VARCHAR2(24));
    create table dup_rowid (duprid VARCHAR2(24));
    set serveroutput on;
    declare
    rowida varchar2(24);
    rowidb varchar2(24);
    rowidt varchar2(24);
    type myCursor is ref cursor;
    acursor myCursor;
    cursor c1 is select rowid1,rowid2 from dups_rowids;
    begin
    for r in c1 loop
    rowida := r.rowid1;
    rowidb := r.rowid2;
    rowidt := NULL;
    open acursor for 'select duprid from dup_rowid where duprid = :rowida' using rowida;
    fetch acursor into rowidt;
    if rowidt is null
    then
    execute immediate 'insert into nodup_rowid values (:rowida)' using rowida;
    execute immediate 'insert into dup_rowid values (:rowida)' using rowida;
    execute immediate 'commit';
    end if;
    close acursor;
    rowidt := NULL;
    open acursor for 'select duprid from dup_rowid where duprid = :rowidb' using rowidb;
    fetch acursor into rowidt;
    if rowidt is null
    then
    execute immediate 'insert into dup_rowid values (:rowidb)' using rowidb;
    execute immediate 'commit';
    end if;
    close acursor;
    end loop;
    end;
    Then your final table would have the geometries from the original table that had no match:
    create table MAP_INDEX_NODUPS
    as select * from MAP_INDEX where rownum < 1;
    insert into MAP_INDEX_NODUPS
    (select *
    from MAP_INDEX
    where ROWID not in
    (select ROWID1 from DUPS_ROWIDS));
    plus only one of the geometries that were equal:
    insert into MAP_INDEX_NODUPS
    (select *
    from MAP_INDEX
    where ROWID in
    (select ROWID1 from NODUP_ROWID);
    Hope this helps.

  • Problems with string comparison using

    I have a problem using the > and < comparison operators.
    When the xsl:if test uses numeric values the comparison works OK. If the
    test uses string values it always returns a false result.
    The style sheet below shows an example (which should run against any
    XML doc with a root element)
    Note - the spurious
    tags are just for debugging- I write the
    output to an HTML page and IE happens to recognise them
    even though the rest of the HTML tags are missing !!
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match="/">
    <xsl:for-each select="*">
    Starting numeric test :
    <xsl:if test="(1 < 2)">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished numeric test :
    Starting alpha test :
    <xsl:if test="('a' < 'b')">
    In Test, ID= <xsl:value-of select="generate-id()"/>
    </xsl:if>
    Finished alpha test :
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>
    null

    Having looked at the XPath spec I believe what I am trying to do (compare strings with gt and lt type tests) is not supported. The spec indicates that they can only be used for node sets or numerics. Presumably the processor is attempting to convert the values to numbers but evaluating them both as NaN (not a number). Can someone confirm this.
    I find this restriction quite strange, is this a situation where an extension function is required ? If so can someone point me to some (Java) examples.
    null

  • Posting Period Range variable - Using Offset

    Hi:
    I need to create queries for each quarter.  Without going through detail, some of my columns in my report I need to use the first two months of the quarter and some of the other columns I need to use the 3 months in each quarter.
    So for example:  We are right now in quarter 1; Jan, Feb, and Mar. Some columns I will be using a range of 1 to 2 and the rest I will be using a range of 1 to 3.  The same type of logic for the other 3 quarters.  I have a posting period variable (Characteristic value) and I was hoping that I was going to be able to use the offset option when I restricted my variable in each column that I only want period 1 and 2.  But when I run the query I don't get any results.  I know that the offset works with "fix" values but it seems not to work with a "range".
    I'm trying to stay way of creating the same queries for each quarter where the difference is only the posting period.
    Does anybody have any idea how I can accomplish this?  Has anybody ever had to do something like this?
    Your thoughts comments will be greatly appreciated!
    Regards,
    Helena

    Hi Arun:
    I know I can restrict the values that I want but I'm trying to avoid in having to create 4 queries..One per quarter.  I'm trying to see if I can just have 1 query and use a range variable which I have already defined as a characteristic value and it's a range.  I use the user exit to populate the initial values depending on the posting period at the time the query runs.  Right now the variable screen will show 1 on the from and a 3 on the to.
    The columns that need all three months are coming out fine in the report.  The issue that I'm encountering is the columns that I only need the two months in this case 1 and 2.  What I did here is still using the same range variable and restrict it with an offset of -1.  When the query  runs, this column comes up with no data.
    How can I get around this?
    Thanks for your help!
    Helena

  • Which number range is used for down payment requests for vendors?

    Hi,
    Which number range is usually used for down payment requests for vendors?
    I would like to use it for:
    Y002 vendors (emplyees)
    Y004 vendors (1-time vendors)
    Y005 vendors (confidential vendors)
    The invoice will be posted via FI via Tcode FB60, FB65 & FB10 and F-02.
    Thank you for your feedback.
    Kind regards,
    Linda

    Hi
    For down payment request the Document type is KA hence the number range which is applicable to KA is applicable for vendor downpament also.
    In your case the number range is based on document types and not related to vendor types.
    Thanks
    Srinivas

  • Ranges input using multiple selection in select-options

    Hello,
    I have declared a single selection field with multiple selection as follows:
    SELECT-OPTIONS:
       S_PONUM FOR EKKO-EBELN NO INTERVALS,
    If a range is entered using multiple selection, no value appears in the selection field on screen, however, the ranges tab in multiple selection shows the range. Is there a way to programatically test if a range has been entered using multiple selection? Help is appreciated.
    Regards

    Hi,
    If you not displaying the intervals then user can enter only one value then option field will be with 'EQ' sign.
    LOOP AT S_PONUM.
    IF S_PONUM-OPTION NE 'EQ'
    " Then Values are entered using the multple selections
    ENDIF.
    ENDLOOP.

  • Nested Table having more than 1 column comparison using ORACLE MULTISET

    Dear ALL,
    I am using ORACLE 10gR2 Database.
    I am currently trying to compare two sets of data that I get from two queries in PL/SQL. I want to use Oracle MULTISET UNION, MULTISET INTERSECT, MULTISET EXCEP for those operations.
    But When I am executing the below given code I am getting the error.
    PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
    My Code
    declare
    type wh_unique_record is record (cpy_key number(22),cnc_id varchar2(22),cust_type_id number,
    device_info_id number,scope_id number,excep_id number,
    config_date date);
    type wh_previous_data_table is table of wh_unique_record;
    wh_previous_data wh_previous_data_table;
    wh_current_data wh_previous_data_table;
    wh_union_data wh_previous_data_table;
    wh_intersect_data wh_previous_data_table;
    -- This cursor I am using to populate the data into the nested tables
    cursor c_previous_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('06-jul-2009','dd-mon-yyyy'));
    cursor c_current_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('16-jul-2009','dd-mon-yyyy'));
    begin
    open c_previous_data;
    fetch c_previous_data bulk collect into wh_previous_data;
    close c_previous_data;
    open c_current_data;
    fetch c_current_data bulk collect into wh_current_data;
    close c_current_data;
    dbms_output.put_line('Previous count '||wh_previous_data.count);
    dbms_output.put_line('Current count '||wh_current_data.count);
    --FYI: MULTISET UNION IS WORKING.*
    wh_union_data := wh_current_data multiset union wh_previous_data;
    dbms_output.put_line('New count '||wh_union_data.count);
    wh_intersect_data:=wh_current_data MULTISET EXCEPT  wh_previous_data;
    dbms_output.put_line('The records that are repeating are  '||wh_intersect_data.count);
    end;
    Previous count 74062
    Current count 74508
    New count 148570
    PL/SQL procedure successfully completed.
    FYI: If I comment the MULTISET EXCEPT conditin then I am getting the output for MULTISET UNION.
    IS THERE ANY WAY ORACLE IS PROVIDING A FUNCTIONALITY WHERE WE CAN HAVE A NESTED TABLE WITH MULTIPLE COLUMNS AND THAT CAN BE USED IN PL/SQL AND USE BULK OPERATION TO POPULATE THE NESTED TABLE WITH MULTIPLE COLUMNS AND USE THE SAME IN MULTISET EXCEPT, MULTISET EXCEPT ETC.
    Appreciate your help on this.
    Thanks,
    Madhu K.

    Madhu,
    I am totally amazed. I didn't think any of the MULTISET operations would work with NTs of records. Lucky you!
    As for the EXCEPT, well, clearly it is a restriction or bug in PL/SQL.
    You may want to report it to Oracle Support.
    Regards,SF
    At 11:45 AM 10/1/2009, you wrote:
    Dear Steven,
    I am using ORACLE 10gR2 Database.
    I am currently trying to compare two sets of data that I get from two queries in PL/SQL. I want to use Oracle MULTISET UNION, MULTISET INTERSECT, MULTISET EXCEP for those operations.
    But When I am executing the below given code I am getting the error.
    PLS-00306: wrong number or types of arguments in call to 'MULTISET_EXCEPT_ALL'
    My Code
    declare
    type wh_unique_record is record (cpy_key number(22),cnc_id varchar2(22),cust_type_id number,
    device_info_id number,scope_id number,excep_id number,
    config_date date);
    type wh_previous_data_table is table of wh_unique_record;
    wh_previous_data wh_previous_data_table;
    wh_current_data wh_previous_data_table;
    wh_union_data wh_previous_data_table;
    wh_intersect_data wh_previous_data_table;
    -- This cursor I am using to populate the data into the nested tables
    cursor c_previous_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('06-jul-2009','dd-mon-yyyy'));
    cursor c_current_data is select cpy_key,cnc_id,cust_type_id,device_info_id,scope_id,excep_id,config_date
    from r_cfg_wh_excep
    where cpy_key=17278
    and trunc(config_date)=trunc(to_date('16-jul-2009','dd-mon-yyyy'));
    begin
    open c_previous_data;
    fetch c_previous_data bulk collect into wh_previous_data;
    close c_previous_data;
    open c_current_data;
    fetch c_current_data bulk collect into wh_current_data;
    close c_current_data;
    dbms_output.put_line('Previous count '||wh_previous_data.count);
    dbms_output.put_line('Current count '||wh_current_data.count);
    --FYI: MULTISET UNION IS WORKING.
    wh_union_data := wh_current_data multiset union wh_previous_data;
    dbms_output.put_line('New count '||wh_union_data.count);
    wh_intersect_data:=wh_current_data MULTISET EXCEPT wh_previous_data;
    dbms_output.put_line('The records that are repeating are '||wh_intersect_data.count);
    end;
    Previous count 74062
    Current count 74508
    New count 148570
    PL/SQL procedure successfully completed.
    FYI: If I comment the MULTISET EXCEPT conditin then I am getting the output for MULTISET UNION.
    IS THERE ANY WAY ORACLE IS PROVIDING A FUNCTIONALITY WHERE WE CAN HAVE A NESTED TABLE WITH MULTIPLE COLUMNS AND THAT CAN BE USED IN PL/SQL AND USE BULK OPERATION TO POPULATE THE NESTED TABLE WITH MULTIPLE COLUMNS AND USE THE SAME IN MULTISET EXCEPT, MULTISET EXCEPT ETC.
    Appreciate your help on this.
    Thanks,
    Madhu K.

Maybe you are looking for

  • ****Iphone 5 blurry photos with ios7 Update**** Please Help

    Looking for some answers as to why my iphone 5 photos are now blurry after the ios7.2 update. -Cleaned the lens -No protective film on the iphone camera lens The camera worked fine before the update. Picture below [iphone 5 on left Blurry] 

  • Apple remote desktop can click little snitch

    I have set up apple remote desktop over the net and I am trying to admin the computer but when I am trying to run a program, I can not control little snitch firewall and click to let the program connect to the internet. why cant apple remote desktop

  • Question about Google search results

    All- I have a site created using iWeb, hosted at MobileMe, with a domain name from GoDaddy. Everything works fine, but searching for my name in Google returns my MobileMe address (web.mac.com/theburians/) instead of my domain name (theburians.com). A

  • Is there some type of solution for charging multiple iphone 4s at once?

    Is there a gadget or charging station for a home with multiple iphone 4 users and ipod touch that helps eliminate all the chargers on the kitchen counters?

  • Currency format and Right Align not working for messagetext in HGrid

    Hi We are dynamically enabling MessageTextinput inside HGrid region, it is Number type and when we set readonly to True it become left align, and currency format also not working, I tried the below various options but nothing is working. Option : 1 O