Blank space updatation to Collection field in Oracle 10g

Hi,
we have the Oracle 9i database in the dev environment and Oracle 10g in Production environment.
In Oracle 9i, the below scenario works find, but in Oracle 10g it won'nt, The scenerio is ,
Update table1
set test_collection = ' '; -- works fine in Oracle 9i , but it wont works in Oracle 10g,
Update tabel1
set test_collection = null; -- works in both the versions.
Please suggest,.
raja k

What is myv, is that the collection name ?? See post number 5 of this thread where I declared it.
>
In Oracle 9i, we need not to specify the collection
name while updating the collection type field in the
table. 9.2.0.6 was notoriously buggy and wasn't considered stable till 9.2.0.7 if I recall correctly. And now (thankfully) it's unsupported.
The sql code was written in concern to Oracle 9i, now
while migrating to Oracle 10g, we are getting the
problem with this. The problem is , i don'nt have the
access to Production environment, which is migrated
to Oracle 10g, we develop the code on Oracle 9i, and
will release to deploy on Oracle 10g. Develop in 9i and deploy to 10g! Do you really think that's a good setup? How about upgrading your development environment to match production.
update table1 set test_collection = null; - this
works fine in Oracle 9i ,
update table1 set test_collection = ''; - this works
fine in Oracle 9i ,
but in Oracle 10g ,
update table1 set test_collection = null; - this
works fine in Oracle 10g ,
update table1 set test_collection = ''; - this won'nt
works in Oracle 10g , Yes, I already understand what your issue is.
as you suggested, do we need to specify the
collection name while updating the collection type
field. in Oracle 10g, In Oracle 9i , it won'nt
required ?? Yes, this would be the correct way to do it.
Karthick,
because null is not same as ''
SQL> select * from dual where ''=null
2 /
no rows selectedErrrm, yes it is actually...
SQL> select 1 from dual where '' is null;
1
1
SQL>
... if you use the correct condition for checking nulls.

Similar Messages

  • Why do I get spaces between the printed fields? (Oracle 10G)

    Hi!
    I use Oracle 10G and I have a program that doesn't work the way it does on previous versions of Oracle. Or maybe it's a wrong options?!?
    Well i need to print the fields from a table with no spaces between them. Instead I get spaces between the fields. As if the dimension of the printed field is three times the real dimension of the field (even if I use SUBST, RTRIM, LPAD).
    For example I have
    SELECT '1', '2' FROM dual;
    I get "1 2 " instead of "12"
    The program is something like this:
    SET SCAN ON
    SET SPACE 0
    SET PAGESIZE 0
    SET PAUSE OFF
    SET FEEDBACK OFF
    SET HEADING OFF
    SET EMBEDDED ON
    SET VERIFY OFF
    SET TERMOUT OFF
    SET LINESIZE 4750
    spool &&4
    Select campo1, campo2 from tabella;
    Oh! It's not possible to concatenate the fields. campo1 || campo1. I get error, I presume, because of the dimension of the line (4750).
    Thanks,
    Miky

    SET COLSEP doesn't work! SPACE 0 should do the same, but doesn't work either When you complains that solution doesn't work, you should provide us the output you got. Because as I showed, and as shoblovk show it worked fine on our side.
    Anyway, what's the version of your Oracle client (SQL*Plus), OS... ?
    Nicolas.
    PS : and use tags as well [pre]paste your code here[/pre]
    Message was edited by:
    N. Gasparotto

  • Remove blank spaces in a text field?

    How can I remove blank spaces in a text field? Some text fields have a lot of blank fields that need to be removed so that I can report only on the text.
    CRXI
    Edited by: Burton Roger on Feb 10, 2009 5:48 PM

    Ex:
    "Hi,
    I have a need for monthly service desk reporting.
    Please provide data on single sheet.
    Thank you"
    I would like to shrink it down to -
    Hi, I have a need for monthly service desk reporting. Please provide data on single sheet. Thank you"

  • Removing leading zeros and leading blank spaces from an input field

    Hi All,
    I have an input field which is alphanumeric and i need to remove the leading zeros and blank spaces in it , but intermediate spaces should be kept .
    so i used the UDF
            String output = input.replaceFirst("^0+","");
            return output;
    but this code does not remove the leading blank spaces . Can anybody help in modifying this code so that even the leading blank spaces along with leading zeros  can be removed .
    Regards ,
    Loveena .

    lets say input is a
    then
    int len = a.length();
    for(int i;i< length;i++)
    if(a.substring(0,1).equals(" ") || a.substring(0,1).equals("0"))
    a = a.substring(1,len);
    return a;
    hope you got the logic so that you can enhance it better

  • Table space not reduce after delete in oracle 10g

    Hi..
    Based on my system, i have found that my oracle table space did not reduce after the deletion query. Why ?.. Could somebody help me. As your info, I am using oracle 10g.
    Thank you,
    Baharin

    After Delete the table space will not be set free. high water mark will not be reset. to regain the space you need to recognize the objects from which you deleted the data. This can be done in many ways.
    1) Move the objects.
    Alter table temp move --> optionally tablespace clause can be used. After this you need to rebuild table indexes.
    2) With 10g table can be shrinked or reorganize to free the space.
    alter table mytable enable row movement;
    alter table mytable shrink space;
    3) Export/Import
    export the objects and drop and recreate with import.

  • Problem with Pro*C reading BLOB field from Oracle 10g

    Hello Experts,
    We have a Pro*c application which is reading the BLOB data fields (a PNG image file) from Oracle data base. It holds the BLOB fields returned from the SQL query into a Unsigned Char structure in Pro*C. The program used work fine on AIX 32 – bit 4.3 and Oracle 8.1 environment.
    Recently, we have upgraded the environment to AIX 64-bit 5.3 and Oracle 10g.Since after the Pro*c program has problem in reading the Blob filed.
    Below is the query we are trying to execute –
    EXEC SQL
    SELECT
    signtre_image, image_file_name_ext
    INTO
    :msipLocalImage INDICATOR :msipLocalImage_i,
    :file_name_ext INDICATOR :file_name_ext_i
    FROM
    dcs_sign
    WHERE
    signtre_nbr = :signtre_nbr;
    Here signtre_image is the BLOB fields and msipLocalImage is a Pro*C structure define as below –
    typedef struct tagSignImage
    long len; /* Image length */
    unsigned char img[1]; /* Pointer to first byte. */
    } MOTS_SIGN_IMAGE;
    The quesry does not give any error or exception message in the Pro*C , program just stops at the point of executing the quesry..When we run the query commenting the BLOB filed it works fine. Also, the query runs good when we run it in the Oracle editor.
    There seems to be problem with the way we are reading the BLOB field in the new Oracle 10g enviromet.
    Does any body have any idea what’s wrong with this query? We really need it to work.
    Any Help will be greatly appreciated.
    Thanks,
    - Rajan Yadav

    Thanks a ton for your response.
    We made the necessary changes as suggested by you.This time we got another flavour of error - SQL Error Code - Inconsistent error while reading BLOB.
    Another thing we noticed is that the data field which we are trying to read is defined as LONG RAW instead of a BLOB in data base.
    Are these two things related in any sense or is there anything else which is causing the error.
    Once again Thanks for your help.
    - Rajan Yadav

  • Metric collection error for Oracle 10g(10.2.0.4) database.

    Hi,
    i just confirured OEM11G(11.1.0.1) on my client test machine and installed 11.1.0.1 agent on one target where 10.2.0.4 database is running. OS is windows 2003 R2.
    after installing the agent, i am able to see the database name in the oem --> database tab. but its status is "metric collection error" how ever i am able to see the details about datafiles etc..but in the status sheet it is showing as "metric collection error". i checked the dbsnmp user name and pasword. both are working. i tried to reconfigure the databae manually. it is erroring out with the following error.
    oracle.sysman.emSDK.emd.comm.CommException: IOException in sending Request :: Connection refused: connect
    Can any body help me to take it forward.
    REgards
    DBA.

    I would check the agent trace file (<AGENT_HOME>\sysman\log\emagent.trc) to see if this gives you any information. To give the Log on as batch privilege will not help (to what user?) I think. It will if you start patching using Grid Control.
    Are you sure the target db is 10.2.0.4? Because it was a issue in 10.2.0.3 and cursor_sharing=similar
    Eric

  • How to return multiple values in a single field in oracle 10g reports

    I have written a formula column using cursor for loop which returns 3 values. But whenever i am assigning the formula column as the source of a field which is inside a repeating frame the field in only showing the first value returned from the formula column. The rest two values are not shown. Please help what to do.

    User11238124 (please include your name)
    If I understand your issue, you should set the vertical elasticity of the repeating frame to 'Variable' or 'Expand'. It is likely set to 'Fixed'.
    Hope this helps,
    Monty

  • Not able to fetch updated data using jdbc and oracle 10g

    Whenever i m updating the data and fetching the same record after updating i m not able to get the fresh/new updated data , old record is fetched every time, but when i checked in database the record gets updated successfully , even if i fire the query two times after 10 seconds using Thread.sleep even then problem persist.
    Please help me out!!!!!!!!
    Implementation has been stucked up!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :(

    Well its okWhat is OK? Your stuff working now?
    i m doing the same thing Apparently not.
    please go thru the below code fragment:
    code for Update :::
    DataAccessBean1 partsHistoryDataAccessBean = new
    DataAccessBean1(context);
    partsHistoryDataAccessBean.setData(data);
    partsHistoryDataAccessBean.update();
    After Updating i m forwading it to the other servletForwarding what? Why do you need another servlet? Just do the query, put the new data into the response object, and return.
    According to your assumption i should get the updated
    data on the other screen but Nope, you don't understand what I'm saying.
    %

  • Could not update  the kernel parameter when oracle 10g  Installation.

    Hi,
    I tried to update ip_local_port_range in sysctl.conf file.
    vi /etc/sysctl.conf
    net.ipv4.ip_local_port_range=1024 65000
    After changing the value i executed following command,
    sysctl -p
    Error : Unknown error 22 setting key 'net.ipv4.ip_local_port_range'
    Please help

    You didn't specify if you are on a linux based OS, it looks like you are, but it would be so kind on your side if you clearly specify the OS version and which DB version you are planning to install.
    When I perform installations of DB10gR2 on OEL4/OEL5 or RHEL4/RHEL5 i issue this commands:
    echo net.ipv4.ip_local_port_range = 1024 65000 >> /etc/sysctl.conf
    Once the kernel parameter have been set, the kernel must be re-read with the /sbin/sysctl -p command.
    ~ Madrid
    http://hrivera99.blogspot.com

  • Looks like a proper update but won't work/oracle 10g

    Hi! What seems to be the trouble with this update?. It looks like it is processing something for a long time,
    but in the end it doesn't do any updating. (Anyway, SELECT -clause brings up all the data I want.)
    UPDATE yhyapu y SET omistaja =
    (SELECT substr(c.surname,1,20)||' '||substr(c.firstname, 1,10)
    FROM genowner o, gencontactinfo c, yhyapu y WHERE o.gencontactinfoid = c.id
    AND y.prounitid = o.objectid AND o.id IN (SELECT MIN(o.id)
    FROM genowner o GROUP BY o.objectid));
    Thanks! Olli Virta

    bluefrog you are wrong...
    how, set omistaja in (select....) will slove this issue...????
    The subquery will always return more than one record if genowner table contains different objectid.
    The solution for this issue is as follows :
    1) Use where clause in the inner subquery and for the update statement like
    update yhyapu
    set
    omistaja = ( select substr(c.surname, 1, 20)||' '||substr(c.firstname, 1, 10)
              from genowner o
              , gencontactinfo c
              , yhyapu y
         where o.gencontactinfoid = c.id
         and y.prounitid = o.objectid
         and o.id in ( select min(x.id)
                   from genowner x
                   where x.objectid = y.prounitid
                   and y.prounitid = ?
         ) where prounitid = ?
    2) If the update statement wants to get executed for all the records in the table yhyapu then
         update yhyapu yy
              set yy.omistaja =
              ( select substr(c.surname, 1, 20)||' '||substr(c.firstname, 1,10)
                   from genowner o
                   , gencontactinfo c
    , yhyapu y
              where o.gencontactinfoid = c.id
              and y.prounitid = o.objectid
              and o.id = ( select min(x.id)
                        from genowner x
                        where x.object_id= y.prounitid )
              and y.prounitid = yy.prounitid
    Hope this will help you Olli Virta...!
    Edited by: Hariharan ST on May 26, 2010 7:19 PM

  • Automatic trimming of blank spaces

    Hello,
    I noticed that Oracle Forms will remove all blank spaces from a text field automatically (if the text field contains only blank spaces).
    Is this controlled by a specific setting ?
    Thanks

    Hello,
    No,i do not need those spaces.
    But i was asking if this can be changed or not.

  • How to UPDATE a big table in Oracle via Bulk Load

    Hi all,
    in a datastore target as Oracle 11g, I have a big table having 300milions of record; the structure is One integer key + 10 columns attributes .
    In IQ Source i have the same table with the same size ; the structure is One integer key + 1 column attributes .
    What i need to do is to UPDATE that single field in Oracle from the values stored in IQ .
    Any idea on how to organize efficiently the dataflow and the target writing mode ? bulk load ? api ?
    thank you
    Maurizio

    Hi,
    You cannot do bulk load when you need to UPDATE a field. Because all a bulk load does is add records to your table.
    Since you have to UPDATE a field, i would suggest to go for SCD with
    source > TC > MO > KG >target
    Arun

  • Show photoes using blob field in Oracle DB

    When create Crystal report using Blob field in Oracle 10g DB, the photoes are tif format stored in blod and there are multipages for every record. However in the Crystal Report,it just show the first page of the photo.
    Are there some ways to display all the pages? Or is it necessary to programming using java or .net to display?

    Not capable. CR will only show the first picture and not an album.

  • I want to update apex 4.0 in oracle ex?

    hello
    This is second time fail to update apex 4.0 in oracle 10g ex.
    I trace following site to update apex 4.0.
    [http://www.oracle.com/technology/products/database/application_express/html/upgrade_apex_for_xe.html] hi
    Update successfully.
    But the problem is when i try to login to screen of apex i can't access.
    please help my.
    note:
    windows xp environment

    thank you,
    I know the problem
    When i run SQL> @apxldimg.sql APEX_HOME i write wrong directory
    unzip apex under c:\
    and i wrote SQL> @apxldimg.sql c:\apex but the right specs is SQL> @apxldimg.sql c:\
    whether thank you from your support.
    Hasan

Maybe you are looking for

  • How to get information from a text editor in the SAP standard transactions

    Hi SAP gurus I have a requirement in which it is required to gte the information from a text editor(which is not a field) in mm02 (click on) goto Purchase Order Text  in this view there is a text editor there is some text  in te the text editor i hav

  • How to find out the object and tables that belong to it

    Do you know how to find out which tables belong to which object in trans. BD66, I have a CABN table but i donot the object name so how i can find out that??

  • Lumia 928 Handset Speaker Defect

    Greetings, Is there any news regarding the headset speaker defect in the Lumia 928 series?  I currently have a warranty replacement on the way from Verizon that is affected by this, and am concerned that the next one may have the same issue. For the

  • Group Policy

    My Computer comes up with This program is blocked by group policy. For more info contact your system administrator.  What do I need to do to get rid of this and be able to download?  Thanks

  • BP wrong creating problem

    I created a new "BP Type Person" having some addresses fields as oblitatories. When I saved it, it did with errors, because some of those obligatory fields weren't field up. Now I'm trying to erase it, and I doesn't let me. The message appears: Data