CLOB update ,insert and select

hi,
could any one tell me which is the best approach to insert, update and select CLOB valoues
and also which CLOB to use (ie java.sql.CLOB or oracle.sql.CLOB) in an oracle database

I'd generally recommend to use the methods in java(x).sql only (for portability reasons).
Update:
ResultSet r = ...;
Clob text = r.getClob(1);
Writer w = text.setCharacterStream(0);
w.write("some text");Insert:
Problem: Clob instantiation.
Either ensure that an empty clob is created as default for clob colums
or use database-specific code like "insert into tab(id, text) values(1, dbms_lob.create_clob...)"
and update that row as above.
Select
Use getString for clobs or (to prevent truncating)
ResultSet r = ...;
Clob c = r.getClob(1);
Reader r = c.getCharacterStream(0);Regards,

Similar Messages

  • Concept insert,update,delete and select

    hi all, i want to ask
    Where I get an explanation of the concept of work process insert, update, delete and select records. From the user starts the query until accessing records the physical . or is there that can give the picture of concept process insert,update,delete and select record??

    I'm not sure what are you asking here.
    Are you asking how do I do these operations in a JDeveloper built application? Which technologies are you using?
    Have a look at this tutorial for the basics of how to do select/update - insert and delete are two more operations you can add to your page from the data control:
    http://www.oracle.com/technology/obe/obe11jdev/ps1/ria_application/developriaapplication_long.htm

  • Searching update insert and delete statements

    Hi.
    Suppose, there is change request containing 10 or more programs.
    One of the program has statements, working with database tables,
    like update, insert or delete.
    Is there any transaction where we can select request number and find
    programs working with tables directly.

    Hello
    1. Goto table E071 with TRKORR = change request and OBJECT = {reps, repo, rept}
    2. In field OBJ_NAME will be all reports names in this request
    3. In abap-programm upload this reports into internal table
    4. Search for 'update' 'insert' and 'delete'
    P.s. it is only for reports

  • Inserting and Selecting LONG with PRO*C

    Is there any special hints in order to use
    the LONG datatype with pro*c ? Can I insert
    and select this kind of type like any other
    CHAR/VARCHAR/VARCHAR2, even if this field
    has a length of about 65536 chars ?

    Well, random because it is not always the same nor the error code.
    - Sometimes I get segmentation fault on "sqlcxt";
    - "ORA-01024: invalid datatype in OCI call" on queries that usually work
    - "ORA-03114: not connected to ORACLE" on queries that usually work
    I have run valgrind and the only "place" where there could be an issue is reported to be caused by oracle libs:
    ==27055== 8,214 bytes in 1 blocks are possibly lost in loss record 193 of 206
    ==27055== at 0x40046FF: calloc (vg_replace_malloc.c:279)
    ==27055== by 0x43E2975: nsbal (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x42F04E6: nsiorini (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x4300FD2: nsopenalloc_nsntx (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x42FFD73: nsopenmplx (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x42F91FD: nsopen (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x42BDAFE: nscall1 (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x42BB0D7: nscall (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x435F653: niotns (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x43F9E40: nigcall (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x436AD4B: osncon (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)
    ==27055== by 0x41EAA31: kpuadef (in /home/oracle/app/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1)

  • Can we have an example of using update, insert, and delete stored procedure

    I would like to see an example of using retrieve (return resultset), update, insert, and delete stored procedures in JSF. I need to see syntax how JSF can call those stored procedures. This option is absolutely important when building web-application. Currently, I haven't found resource to do for this purpose yet. The database can be any such Oracle, DB2, pointbase, etc that support stored procedures.
    Anyone knows?
    Thanks,
    Tue Vu

    Hi ttv,
    I asked around a bit and here's some more info:
    To bind a ResultSet to a read only Data Table component just set the "value" property of the Data Table component to point at it, and JSF will synthesize a DataModel around it.
    * Note that because we can't call the stored procedure at design time, Creator can't do the fancy table layout stuff it does for rowsets. You'll need to hand craft the columns just like the Google Client example.
    * As I mentioned previously, you will have to manually code the stored procedure access in your java code - see the code clip I mentioned in previous reply (and if this is via a stored procedure, then any textbook about JDBC will undoubtedly have examples). Simplest way might be a getter method on the page bean that contains the call to the stored procedure and returns the resulting ResultSet object.
    * Don't forget to close the result set - we typically do this at the end of the request (i.e. add a close in the afterRenderResponse() method.
    * Don't throw exceptions - or if you have to, make sure you close the result set in a finally clause (thrown exceptions bypass the afterRenderResponse method in the lifecycle).
    * You give up on the caching provided by our RowSetDataModel (which can't be connected to a ResultSet even manually), so I would recommend that you only use datatables to display the data and then go to a single row page to do edits/deletes (similar to the TwoPage example in AppModel and the Update, Insert Delete tutorial).
    And yes please do submit an example - we will gladly post it!!! :) The best way to submit this kind of thing would be through:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    on the right side, Related Links, under Creator Heros, click Submit Content and there you can send it in!
    Hope this helps!
    Val

  • URGENT !! Capture the insert and select on database

    Hi,
    I need to capture the inserts and selects on the database.
    What are the options available on 9i?
    Thanks in advance!

    I don;t know how many times I've had to say this, but since I've had to say it to my boss, it bears repeating here:
    The SPFILE makes absolutely zero, null, nought difference to whether or not something is changeable dynamically or not. Not one bit, one whit or one iota.
    Parameters are as static or as dynamic as they were when init.oras rules the roost. Check in V$PARAMETER: if the thing says ISSYSMODIFIABLE is TRUE, then the parameter can be altered with an alter system command -and that's true whether you're using an init.ora or an spfile. If it says ISSYSMODIFIABLE=FALSE, then the parameter CANNOT be altered with an alter system command, and that's true whether you're using an init.ora or an spfile.
    Now comes the subtlety: if you add SCOPE=SPFILE to your alter system command then you aren't actually altering the system at all. All you're doing is asking the instance to edit the spfile. So an alter system set db_block_size=67238 scope=spfile will work, because you're not actually asking to alter the current block size at all. You're merely asking the instance to do what you would otherwise have done with notepad or gedit to a traditional init.ora.
    Only if you SCOPE=MEMORY is your alter system command actually trying to change the currently running instance.
    Of course, the trouble starts when you miss off a SCOPE clause, because then you get SCOPE=BOTH, which means MEMORY+SPFILE. But try that on a parameter which is SYSMODIFIABLE=FALSE: it won't work, because the MEMORY bit trips over the fact that the parameter is not system (dynamically) modifiable. Which just goes to prove that the existence of an SPFILE changes ABSOLUTELY NOTHING about whether a parameter can be dynamically modified or not.
    So no, the sentence "my database is using spfile and I have option to use alter system command" makes zero sense if, by it, you mean "I'm using an spfile so can I change things dynamically which I wouldn't be allowed to if I was stuck using a boring old init.ora"
    The answer is always and forever, "NO"!
    I blame a certain bouffant-haired so-called expert for first promulgating this myth that all parameters suddenly became dynamic in the presence of an spfile. It was never true when he wrote it. It isn't true now. It never will be true. It just happens to be the case that "alter system..scope=spfile" is Oracle's equivalent of "vi init.ora" as far as spfiles are concerned.

  • Insert and select in one statement

    using MS Sql server and VB i can execute two queries Insert and select in one statement e.g. (insert into (....) values (...) Select @@Identity).
    how can i do the same thing using Oracle and VB. ???
    It gives error. here's what i want to do.
    (insert into table1 (...) values (...) Select table1_sequence.currval from dual )
    Khurram

    Here's how you can achieve the same Oracle :-
    Test Db>desc tmp1;
    Name Null? Type
    EMP_NO VARCHAR2(10)
    EID NUMBER
    Test Db>insert into tmp1 (emp_no, eid)
    2 select '123', 1
    3 from dual;
    1 row created.
    Shailender Mehta

  • 2 time zones during inserting and selecting the data.

    we have applied DST patch and DST JAVA patch sucessfuly on oracle 10.1.0.3 version database . After that we have problem
    It was noticed that it failing for the following 2 time zones during inserting and selecting the data.
    MST7
    HST10
    Please help me to solve this

    Try MetaLink. Lots of hits on ORA-1882.
    Specifically, Note 414590.1 "Time Zone IDs for 7 Time Zones Changed in Time Zone Files Version 3 and Higher, Possible ORA-1882 After Upgrade" sounds promising.
    -Mark

  • Designing a table for high rate of concurrent inserts and selects...

    I am looking for some recommendations on designing a table the will be inserted into from both nodes of a 2 node cluster quite heavily during peak hours when we are taking alot of orders. We are an online store and we are designing a table that will be used to hold product sku's for items that are placed in a shoppers cart at the same time and then we plan to use this table as a way of subtracting the inventory in this table as a minus in a view of our true nventory quantities?
    Not sure if that was clear but basically this table will be getting hit heavily for inserts and at the same time we will be using the data in the table to select from it so we can subtract the shu's that exists in the table.
    I am looking for techniques that maybe some of our guru's have implemented in this type of design in a rac environment that will help in the conncurrency that we are expectiing.
    Should I be building my tables with the smallest block size available as to avoid hot block in the db buffer cache and also we are using a sequence to generate and ID on the table and I have set a large cache size on the sequence (5000).
    We are planning on using ASSM table spaces with auto extent and segment space management as everthing we have read indicated that this is the best type of tablespace mgmt in RAC.
    What other factors should I be considering.
    any help or suggestions are greatly appreciated.
    Thanks in advance.

    user520056 wrote:
    I am looking for some recommendations on designing a table the will be inserted into from both nodes of a 2 node cluster quite heavily during peak hours when we are taking alot of orders. We are an online store and we are designing a table that will be used to hold product sku's for items that are placed in a shoppers cart at the same time and then we plan to use this table as a way of subtracting the inventory in this table as a minus in a view of our true nventory quantities?
    Not sure if that was clear but basically this table will be getting hit heavily for inserts and at the same time we will be using the data in the table to select from it so we can subtract the shu's that exists in the table.
    I am looking for techniques that maybe some of our guru's have implemented in this type of design in a rac environment that will help in the conncurrency that we are expectiing.
    Should I be building my tables with the smallest block size available as to avoid hot block in the db buffer cache and also we are using a sequence to generate and ID on the table and I have set a large cache size on the sequence (5000).
    We are planning on using ASSM table spaces with auto extent and segment space management as everthing we have read indicated that this is the best type of tablespace mgmt in RAC.
    What other factors should I be considering.
    any help or suggestions are greatly appreciated.
    Thanks in advance.See my .sig for other questions you should answer - OS, DB (version &c.),
    CPU/RAM/Disk...
    If you're running this on a 386 with 16 MB of RAM with on HDD, then you could
    have problems - if you're running it on something different, well that changes
    the possible answers.
    Paul...
    When asking database related questions, please give other posters
    some clues, like OS (with version), version of Oracle being used and DDL.
    Other trivia such as CPU + Disk configuration might also be useful.
    The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks.
    Furthermore, as a courtesy to those who spend time analysing and attempting to help,
    please do not top post and do try to trim your replies!

  • Long time on buffer sort with a insert and select through a dblink

    I am doing a fairly simple "insert into select from" statement through a dblink, but something is going very wrong on the other side of the link. I am getting a huge buffer sort time in the explain plan (line 9) and I'm not sure why. When I try to run sql tuning on it from the other side of the dblink, I get an ora-600 error "ORA-24327: need explicit attach before authenticating a user".
    Here is the original sql:
    INSERT INTO PACE_IR_MOISTURE@PRODDMT00 (SCHEDULE_SEQ, LAB_SAMPLE_ID, HSN, SAMPLE_TYPE, MATRIX, SYSTEM_ID)
    SELECT DISTINCT S.SCHEDULE_SEQ, PI.LAB_SAMPLE_ID, PI.HSN, SAM.SAMPLE_TYPE, SAM.MATRIX, :B1 FROM SCHEDULES S
    JOIN PERMANENT_IDS PI ON PI.HSN = S.SCHEDULE_ID
    JOIN SAMPLES SAM ON PI.HSN = SAM.HSN
    JOIN PROJECT_SAMPLES PS ON PS.HSN = SAM.HSN
    JOIN PROJECTS P ON PS.PROJECT_SEQ = PS.PROJECT_SEQ
    WHERE S.PROC_CODE = 'DRY WEIGHT' AND S.ACTIVE_FLAG = 'C' AND S.COND_CODE = 'CH' AND P.WIP_STATUS IN ('WP','HO')
    AND SAM.WIP_STATUS = 'WP';
    Here is the sql as it appears on proddmt00:
    INSERT INTO "PACE_IR_MOISTURE" ("SCHEDULE_SEQ","LAB_SAMPLE_ID","HSN","SAMPLE_TYPE","MATRIX","SYSTEM_ID")
    SELECT DISTINCT "A6"."SCHEDULE_SEQ","A5"."LAB_SAMPLE_ID","A5"."HSN","A4"."SAMPLE_TYPE","A4"."MATRIX",:B1
    FROM "SCHEDULES"@! "A6","PERMANENT_IDS"@! "A5","SAMPLES"@! "A4","PROJECT_SAMPLES"@! "A3","PROJECTS"@! "A2"
    WHERE "A6"."PROC_CODE"='DRY WEIGHT' AND "A6"."ACTIVE_FLAG"='C' AND "A6"."COND_CODE"='CH' AND ("A2"."WIP_STATUS"='WP' OR "A2"."WIP_STATUS"='HO') AND "A4"."WIP_STATUS"='WP' AND "A3"."PROJECT_SEQ"="A3"."PROJECT_SEQ" AND "A3"."HSN"="A4"."HSN" AND "A5"."HSN"="A4"."HSN" AND "A5"."HSN"="A6"."SCHEDULE_ID";
    Here is the explain plan on proddmt00:
    PLAN_TABLE_OUTPUT
    SQL_ID cvgpfkhdhn835, child number 0
    INSERT INTO "PACE_IR_MOISTURE" ("SCHEDULE_SEQ","LAB_SAMPLE_ID","HSN","SAMPLE_TYPE","MATRIX","SYSTEM_ID")
    SELECT DISTINCT "A6"."SCHEDULE_SEQ","A5"."LAB_SAMPLE_ID","A5"."HSN","A4"."SAMPLE_TYPE","A4"."MATRIX",:B1
    FROM "SCHEDULES"@! "A6","PERMANENT_IDS"@! "A5","SAMPLES"@! "A4","PROJECT_SAMPLES"@! "A3","PROJECTS"@! "A2"
    WHERE "A6"."PROC_CODE"='DRY WEIGHT' AND "A6"."ACTIVE_FLAG"='C' AND "A6"."COND_CODE"='CH' AND
    ("A2"."WIP_STATUS"='WP' OR "A2"."WIP_STATUS"='HO') AND "A4"."WIP_STATUS"='WP' AND
    "A3"."PROJECT_SEQ"="A3"."PROJECT_SEQ" AND "A3"."HSN"="A4"."HSN" AND "A5"."HSN"="A4"."HSN" AND
    "A5"."HSN"="A6"."SCHEDULE_ID"
    Plan hash value: 3310593411
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | INSERT STATEMENT | | | | | 5426M(100)| | | |
    | 1 | HASH UNIQUE | | 1210K| 118M| 262M| 5426M (3)|999:59:59 | | |
    |* 2 | HASH JOIN | | 763G| 54T| 8152K| 4300M (1)|999:59:59 | | |
    | 3 | REMOTE | | 231K| 5429K| | 3389 (2)| 00:00:41 | ! | R->S |
    | 4 | MERGE JOIN CARTESIAN | | 1254G| 61T| | 1361M (74)|999:59:59 | | |
    | 5 | MERGE JOIN CARTESIAN| | 3297K| 128M| | 22869 (5)| 00:04:35 | | |
    | 6 | REMOTE | SCHEDULES | 79 | 3002 | | 75 (0)| 00:00:01 | ! | R->S |
    | 7 | BUFFER SORT | | 41830 | 122K| | 22794 (5)| 00:04:34 | | |
    | 8 | REMOTE | PROJECTS | 41830 | 122K| | 281 (2)| 00:00:04 | ! | R->S |
    | 9 | BUFFER SORT | | 380K| 4828K| | 1361M (74)|999:59:59 | | |
    | 10 | REMOTE | PROJECT_SAMPLES | 380K| 4828K| | 111 (0)| 00:00:02 | ! | R->S |
    Predicate Information (identified by operation id):
    2 - access("A3"."HSN"="A4"."HSN" AND "A5"."HSN"="A6"."SCHEDULE_ID")

    Please use code tags... your formatted message is below:
    From the looks of your explain plan... these entries :
    Id      Operation      Name      Rows      Bytes     TempSpc      Cost (%CPU)      Time      Inst     IN-OUT
    4      MERGE JOIN CARTESIAN            1254G      61T            1361M (74)     999:59:59           
    5      MERGE JOIN CARTESIAN            3297K      128M            22869 (5)      00:04:35            Are causing extensive cpu processing, probably due to the cartesian join (includes sorting)... does "61T" mean 61 terabytes? Holy hell
    From the looks of the explain plan these tables don't look partitioned.... can you confirm?
    Why are you selecting distinct? If this is for ETL or data warehouse related procedure it ain't a good idea to use distinct... well ever... it's horrible for performance.
    INSERT INTO PACE_IR_MOISTURE@PRODDMT00 (SCHEDULE_SEQ, LAB_SAMPLE_ID, HSN, SAMPLE_TYPE, MATRIX, SYSTEM_ID)
    SELECT DISTINCT S.SCHEDULE_SEQ, PI.LAB_SAMPLE_ID, PI.HSN, SAM.SAMPLE_TYPE, SAM.MATRIX, :B1 FROM SCHEDULES S
    JOIN PERMANENT_IDS PI ON PI.HSN = S.SCHEDULE_ID
    JOIN SAMPLES SAM ON PI.HSN = SAM.HSN
    JOIN PROJECT_SAMPLES PS ON PS.HSN = SAM.HSN
    JOIN PROJECTS P ON PS.PROJECT_SEQ = PS.PROJECT_SEQ
    WHERE S.PROC_CODE = 'DRY WEIGHT' AND S.ACTIVE_FLAG = 'C' AND S.COND_CODE = 'CH' AND P.WIP_STATUS IN ('WP','HO')
    AND SAM.WIP_STATUS = 'WP';
    Here is the sql as it appears on proddmt00:
    INSERT INTO "PACE_IR_MOISTURE" ("SCHEDULE_SEQ","LAB_SAMPLE_ID","HSN","SAMPLE_TYPE","MATRIX","SYSTEM_ID")
    SELECT DISTINCT "A6"."SCHEDULE_SEQ","A5"."LAB_SAMPLE_ID","A5"."HSN","A4"."SAMPLE_TYPE","A4"."MATRIX",:B1
    FROM "SCHEDULES"@! "A6","PERMANENT_IDS"@! "A5","SAMPLES"@! "A4","PROJECT_SAMPLES"@! "A3","PROJECTS"@! "A2"
    WHERE "A6"."PROC_CODE"='DRY WEIGHT' AND "A6"."ACTIVE_FLAG"='C' AND "A6"."COND_CODE"='CH' AND ("A2"."WIP_STATUS"='WP' OR "A2"."WIP_STATUS"='HO') AND "A4"."WIP_STATUS"='WP' AND "A3"."PROJECT_SEQ"="A3"."PROJECT_SEQ" AND "A3"."HSN"="A4"."HSN" AND "A5"."HSN"="A4"."HSN" AND "A5"."HSN"="A6"."SCHEDULE_ID";
    Here is the explain plan on proddmt00:
    PLAN_TABLE_OUTPUT
    SQL_ID cvgpfkhdhn835, child number 0
    INSERT INTO "PACE_IR_MOISTURE" ("SCHEDULE_SEQ","LAB_SAMPLE_ID","HSN","SAMPLE_TYPE","MATRIX","SYSTEM_ID")
    SELECT DISTINCT "A6"."SCHEDULE_SEQ","A5"."LAB_SAMPLE_ID","A5"."HSN","A4"."SAMPLE_TYPE","A4"."MATRIX",:B1
    FROM "SCHEDULES"@! "A6","PERMANENT_IDS"@! "A5","SAMPLES"@! "A4","PROJECT_SAMPLES"@! "A3","PROJECTS"@! "A2"
    WHERE "A6"."PROC_CODE"='DRY WEIGHT' AND "A6"."ACTIVE_FLAG"='C' AND "A6"."COND_CODE"='CH' AND
    ("A2"."WIP_STATUS"='WP' OR "A2"."WIP_STATUS"='HO') AND "A4"."WIP_STATUS"='WP' AND
    "A3"."PROJECT_SEQ"="A3"."PROJECT_SEQ" AND "A3"."HSN"="A4"."HSN" AND "A5"."HSN"="A4"."HSN" AND
    "A5"."HSN"="A6"."SCHEDULE_ID"
    Plan hash value: 3310593411
    Id      Operation      Name      Rows      Bytes     TempSpc      Cost (%CPU)      Time      Inst     IN-OUT
    0      INSERT STATEMENT                              5426M(100)                 
    1      HASH UNIQUE            1210K      118M      262M      5426M (3)     999:59:59           
    * 2      HASH JOIN            763G      54T      8152K      4300M (1)     999:59:59           
    3      REMOTE            231K      5429K            3389 (2)      00:00:41      !      R->S
    4      MERGE JOIN CARTESIAN            1254G      61T            1361M (74)     999:59:59           
    5      MERGE JOIN CARTESIAN            3297K      128M            22869 (5)      00:04:35           
    6      REMOTE      SCHEDULES      79      3002            75 (0)      00:00:01      !      R->S
    7      BUFFER SORT            41830      122K            22794 (5)      00:04:34           
    8      REMOTE      PROJECTS      41830      122K            281 (2)      00:00:04      !      R->S
    9      BUFFER SORT            380K      4828K            1361M (74)     999:59:59           
    10      REMOTE      PROJECT_SAMPLES      380K      4828K            111 (0)      00:00:02      !      R->S
    Predicate Information (identified by operation id):
    2 - access("A3"."HSN"="A4"."HSN" AND "A5"."HSN"="A6"."SCHEDULE_ID")Edited by: TheDudeNJ on Oct 13, 2009 1:11 PM

  • Insert and select blob data

    how do i insert and update data whose data type is blob
    create table sample (no number,name varchar2(50),photo blob);
    my photo is in the format of jpg at Location C:\photos\39876542.jpg
    now ho do i do this using sqlplus .
    searching for the commands .My oracle version is 10.2 on windows

    Better to go through oracle doc.
    But, here is a quick link that you may try ->
    http://arjudba.blogspot.com/2008/06/how-to-insert-blob-dataimage-video-into.html
    Regards.
    Satyaki De.

  • Problems with update/insert and the ON clause

    I have two rather identical mappings, both supporting SCD Type II. One of them works, the other one doesn't.
    As in the SCD whitepaper, I have a split, that ultimately ends in a union, and then UPDATE/INSERTs into the target dimension. My problem is, that though using the matching_id for matching in one mapping, it is not allowed in the second mapping. The error is ORA-38104: The columns refererred in the ON-Clause cannot be updated "MyTable.MyId" (all loosely translated).
    I just don't understand it, as it should be able to match the ID, and if not found, create a new record using INSERT.
    I found a description of the error that sounded like this (https://cwisdb.cc.kuleuven.ac.be/ora10doc/server.101/b10744/e38001.htm):
    ORA-38104: Columns referenced in the ON Clause cannot be updated: string
    Cause: LHS of UPDATE SET contains the columns referenced in the ON Clause
    Action: none
    I just don't understand how this can be a problem, since I have to carry the surrogate key along, in order to assure that the proper records gets updated...
    Anyone who can enlighten me on this one?
    Regards
    Kim

    Oh yes :) I was a quite active participant. What puzzles me is, that I cannot get mapping #2 to work. I have tried to do everything virtually alike, with regards to the surrogate key, and the extra mapping column.
    My setting for the keys are as below:
    Surrogate Matching
    Load column when inserting: yes no
    Load column when updating: yes no
    Match column when updating: no yes
    Load column when deleting: no no
    Table best viewed in notepad :)
    It "feels" like it's trying to update the surrogate key, instead of actually matching.
    Regards
    Kim

  • Setup to replicate update/insert and not delete

    Currently what I am looking to do is setup streams to do a one way replication of only updates and inserts but not include deteles. I've only done the most basic searches through the Oracle documentation, but as I read the 10.2G pdfs so far it seems like you can only turn on streams for all DML transactions and not selectively.
    Is there an option like include_deletes, which I could set to false that I am missing?

    Hi user489811.
    You can configure the Streams capture process at the table level for DML capture and you can to exclude a specific DML operation from the capture process. For example, you do not want to capture the DELETE operation.
    Yes, is possible. Exists two ways to do this.
    For example, read a bit about rules and the package DBMS_RULE_ADM to implement that you want.
    Best regards
    Roberto

  • Currently updated / Inserted data selection

    Dear Experts,
    Following is my table structure :
    CREATE TABLE RR_SYSTEM_ERROR
    PTYPE CHAR(1 BYTE),
    CODE1 CHAR(5 BYTE),
    CODE2 CHAR(5 BYTE),
    QNO CHAR(5 BYTE),
    ERR_DESC VARCHAR2(1000 BYTE),
    DATE_STAMP TIMESTAMP(6)
    Data :
    PTYPE CODE1 CODE2      QNO      ERR_DESC      DATE_STAMP
    C AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                    12/13/2010 11:56:56.000000 AM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                    12/13/2010 12:00:35.000000 PM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                     12/13/2010 11:58:33.000000 AM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                     12/13/2010 12:00:10.000000 PM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                     12/13/2010 11:52:02.000000 AM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                     12/13/2010 11:52:56.000000 AM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                     12/13/2010 11:54:33.000000 AM
    C      AE      IQ      02163      ^^AT 09-11-2010 11:8:5 ERROR Msg: Error                     12/13/2010 11:55:27.000000 AM
    This table will have duplicate data in first five cloumns :.
    The requirement is :
    I have to filter the recently inserted or updated "ERR_DESC" in the table , selection of the data will be based on first 4 column,
    How can i filter it ?... Kindly help me...
    Regards
    ASY@UAE

    Hi,
    You can use the correlated query as below.
    select * from rr_system_error a
    where a.date_stamp=(select max(date_stamp)
                      from RR_SYSTEM_ERROR b
                      where a.pype=b.type
                      AND   a.code1=b.code1
                      AND   a.code2=b.code2)Hope this helps..
    Regards,
    Achyut

  • SQL Insert and Select statements on same page

    Newbie here.
    Is it possible to insert data from a form to a database and then get data from the database using "select" from the same page.
    I have a form that submits the authors details to an Access database but I need to get the AuthorID (which is an autonumber in the table) to show on the same page.
    <%@ page language="java" contentType="text/html" import="java.sql.*" %>
    <html>
    <head>
    <title>Confirm Details Submission</title>
    </head>
    </body>
    <%
    String title = request.getParameter("title");
    String surname = request.getParameter("surname");
    surname = surname.replaceAll("'", "''");
    String forename = request.getParameter("forename");
    forename = forename.replaceAll("'", "''");
    String address = request.getParameter("address");
    address = address.replaceAll("'", "''");
    String address2 = request.getParameter("address2");
    address2 = address2.replaceAll("'", "''");
    String town = request.getParameter("town");
    town = town.replaceAll("'", "''");
    String postcode = request.getParameter("postcode");
    String email = request.getParameter("email");
    email = email.replaceAll("'", "''");
    String dob = request.getParameter("dob");
    String telephone = request.getParameter("telephone");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection Conn = DriverManager.getConnection("jdbc:odbc:Novbase","","");
    Statement Stmt = Conn.createStatement();
    String Query = ("INSERT INTO Author (Title, Surname, Forename, Address, Address2, Town, Postcode, EMail, DOB, TelNo) VALUES ('" + title + "', '" + surname + "', '" + forename + "', '" + address + "', '" + address2 + "', '" + town + "', '" + postcode + "', '" + email + "', '" + dob + "', '" + telephone +"')");
    //Stmt.executeUpdate(Query) is where the records are inserted.
    int SQLStatus = Stmt.executeUpdate(Query);
         if(SQLStatus != 0)
    %>
    Thank you. Your Author ID number is ??
    <%
    else
    %>
    Error - Your details have not been submitted</font></h4>
    <br>
    Please click back on your browser and try again. If you experience further difficulties please go to our <a href ="help.html">help</a> pages.<br>
    <%
    Stmt.close(); Conn.close();
    %>
    </body>
    </html>

    Hi,
    You could execute queries as many times as you want using the same connection.
    For ex;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection Conn = DriverManager.getConnection("jdbc:odbc:Novbase","","");
    Statement Stmt = Conn.createStatement();
    String Query = ("INSERT INTO Author (Title, Surname, Forename, Address, Address2, Town, Postcode, EMail, DOB, TelNo) VALUES ('" + title + "', '" + surname + "', '" + forename + "', '" + address + "', '" + address2 + "', '" + town + "', '" + postcode + "', '" + email + "', '" + dob + "', '" + telephone +"')");
    //Stmt.executeUpdate(Query) is where the records are inserted.
    int SQLStatus = Stmt.executeUpdate(Query);
    if(SQLStatus != 0)
    Query = "SELECT Forname FROM Author;";
    ResultSet name = stmt.executeQuery(Query);
    //Now name will have all the Forname fields in the database. You could retrieve that using the get methods.
    %>
    Thank you. Your Author ID number is ??
    <%
    else
    %>
    Error - Your details have not been submitted</font></h4>
    <br>
    Please click back on your browser and try again. If you experience further difficulties please go to our <a href ="help.html">help</a> pages.<br>
    <%
    Stmt.close(); Conn.close();
    %>
    I hope that can help you.
    Rajesh

Maybe you are looking for

  • How do I connect my mid-2009 Macbook pro to my HDMI television and get sound?

    How do I connect my mid-2009 Macbook pro to my HDMI television and get sound?

  • Getting error while starting manage server on weblogic 9.2 platform

    Hi I am getting following error while I try to start manage server java.lang.NullPointerException: at com.bea.console.handles.JMXHandle.(JMXHandle.java:73) at com.bea.console.actions.core.server.lifecycle.Lifecycle.noAccess(Lifecycle.java:771) at com

  • Open PDF with commandLink

    Hi, I'm trying to generate and open a PDF file in a new window, but i'm having problems showing the file. My main doubt is what to return from the Action method: The button: <h:commandLink styleClass="commandLink" id="link1" target="_blank" action="#

  • Which is Better VBR or 256kps?

    I have two identical downloads of an album (don't ask)...  However, one uses VBR to store the mp3s and the other is straight 256kps.  The VBR goes up and down in bit rate; Sometimes it's over 256kps and other times it goes below 256kps on certain son

  • Preference for Comments display can not be resored

    Just after installation, size of commments stick notes is fine. But after change setting in Preference to be 90pixl/inch, size become too large for notes. If change setting to be smaller, such as 40, text note icon is smaller which is fine. However,