How to insert a value into a field of binary type?

I've been using Oracle for a while now but never dealt with BLOB
or long raw type before. Does anyone here know how to insert a
record into a field of either blob or long raw type?
Any suggestions would be very appreicated.
Thanks.

pls used the loadfromfile procedure which is in the DBMS_LOB
package to insert the data from external os file into blob data
type column.
Kunjan

Similar Messages

  • How to insert column values into database as rows

    Hi,
    I have 8 columns and some not null columns. Based on not null columns I want to insert into table as rows. The 8 columns may contain values or no value. If the first column contains data, then I have to insert into one row. if the second column contains data I have to insert a row and in second column. respectively...So How can I insert column values into rows. Can I write 8 insert statements. (OR) is it possible to insert data from columns using where clause.
    Please help me out....
    Thanks in Advance

    Lines Table:
    line_id, orcl_bank_account_num, product_type, service_type, lease_type,
    funding_type, cpi, billing_frequency_unit_cd , annual_due_date ,
    pricing_start_date, pricing_end_date, install_date, contract_end_date ,
    prdct_replacement_cost_amt, cradle_replacement_amt, supranet_contract,
    issuance_fee, board_inactive_date, header_id, creation_date, last_modified_date,
    created_by_nam, modified_by_nam, activeinactive_flg, prdct_bill_amt_yr1,
    prdct_bill_amt_yr2, prdct_bill_amt_yr3, prdct_bill_amt_yr4, prdct_bill_amt_yr5,
    prdct_bill_amt_yr6, prdct_bill_amt_yr7, prdct_bill_amt_yr8, activation_fee_yr1,
    activation_fee_yr2, activation_fee_yr3, activation_fee_yr4, activation_fee_yr5,
    activation_fee_yr6, activation_fee_yr7, activation_fee_yr8,
    In this table the columns structure is :
    -- PRDCT_BILL_AMT_YR (1 to 8) NUMBER(14,4)
    -- ACTIVATION_FEE_YR (1 to 8) NUMBER(8,2)
    I have one more table:
    PRDCT_INS_AMT               NUMBER(14,4)
    ACTIVATION_FEE_AMT          NUMBER(14,4)
    I want to insert prdct_bill_amt_yr (1 to 8) columns data into PRDCT_INS_AMT column. similarly activation_fee (1 to 8) columns data.
    But the data should be inserted based product_type, service_type, lease_type columns values. (These 3 columns may contain upto 45 combinations).

  • How do I insert multiple values into different fields in a stored procedure

    I am writing a Stored Procedure where I select data from various queries, insert the results into a variable and then I insert the variables into final target table. This works fine when the queries return only one row. However I have some queries that return multiple rows and I am trying to insert them into different fields in the target table. My query is like
    SELECT DESCRIPTION, SUM(AMOUNT)
    INTO v_description, v_amount
    FROM SOURCE_TABLE
    GROUP BY DESCRIPTION;
    This returns values like
    Value A , 100
    Value B, 200
    Value C, 300
    The Target Table has fields for each of the above types e.g.
    VALUE_A, VALUE_B, VALUE_C
    I am inserting the data from a query like
    INSERT INTO TARGET_TABLE (VALUE_A, VALUE_B, VALUE_C)
    VALUES (...)
    How do I split out the values returned by the first query to insert into the Insert Statement? Or do I need to split the data in the statement that inserts into the variables?
    Thanks
    GB

    "Some of the amounts returned are negative so the MAX in the select statement returns 0 instead of the negative value. If I use MIN instead of MAX it returns the correct negative value. However I might not know when the amount is going to be positive or negative. Do you have any suggestions on how I can resolve this?"
    Perhaps something like this could be done in combination with the pivot queries above, although it seems cumbersome.
    SQL> with data as (
      2        select  0 a, 0 b,  0 c from dual   -- So column a has values {0, 1, 4},
      3  union select  1 a, 2 b, -3 c from dual   --    column b has values {0, 2, 5},
      4  union select  4 a, 5 b, -6 c from dual ) --    column c has values {0, -3, -6}.
      5  --
      6  select  ( case when max.a > 0 then max.a else min.a end) abs_max_a
      7  ,       ( case when max.b > 0 then max.b else min.b end) abs_max_b
      8  ,       ( case when max.c > 0 then max.c else min.c end) abs_max_c
      9  from    ( select  ( select max(a) from data ) a
    10            ,       ( select max(b) from data ) b
    11            ,       ( select max(c) from data ) c
    12            from      dual ) max
    13  ,       ( select  ( select min(a) from data ) a
    14            ,       ( select min(b) from data ) b
    15            ,       ( select min(c) from data ) c
    16            from      dual ) min
    17  /
    ABS_MAX_A  ABS_MAX_B  ABS_MAX_C
             4          5         -6
    SQL>

  • How to insert parameter value into multiple columns and rows

    Hi All,
    I have one procedure insert_tab and I am passing
    100~101~102:103~104~105:106~107~108 as a parameter to that procedure. I wanted to insert each numeric value into one column. The output of the table should contain
    Table:
    Col1 Col2 Col3
    100 101 102
    103 104 105
    106 107 108
    Awaiting for your reply..

    That's not more clear for me...
    Anyway, if you really want a procedure for that, try :
    SQL> create table tblstr (col1 number,col2 number,col3 number);
    Table created.
    SQL>
    SQL> create or replace procedure insert_fct (p_string IN varchar2)
      2  as
      3  v_string     varchar2(4000):=p_string||':';
      4  v_substring  varchar2(4000);
      5 
      6  begin
      7      while instr(v_string,':') > 0 loop
      8            v_substring := substr(v_string,1,instr(v_string,':')-1)||'~';
      9            insert into tblstr(col1,col2,col3)
    10            values (substr(v_substring,1,instr(v_substring,'~',1,1)-1),
    11                    substr(v_substring,instr(v_substring,'~',1,1)+1,instr(v_substring,'~',1,2)-instr(v_substring,'~',1,1)-1),
    12                    substr(v_substring,instr(v_substring,'~',1,2)+1,instr(v_substring,'~',1,3)-instr(v_substring,'~',1,2)-1));
    13            v_string:=substr(v_string,instr(v_string,':')+1);
    14      end loop;
    15  end;
    16  /
    Procedure created.
    SQL>
    SQL> show err
    No errors.
    SQL>
    SQL> select * from tblstr;
    no rows selected
    SQL> exec insert_fct('100~101~102:103~104~105:106~107~108')
    PL/SQL procedure successfully completed.
    SQL> select * from tblstr;
          COL1       COL2       COL3
           100        101        102
           103        104        105
           106        107        108
    SQL> exec insert_fct('109~~')
    PL/SQL procedure successfully completed.
    SQL> exec insert_fct('~110~')
    PL/SQL procedure successfully completed.
    SQL> exec insert_fct('~~111')
    PL/SQL procedure successfully completed.
    SQL> select * from tblstr;
          COL1       COL2       COL3
           100        101        102
           103        104        105
           106        107        108
           109
                      110
                                 111
    6 rows selected.
    SQL> Nicolas.

  • How to insert a value into a table

    I have an ordering system. It displays all the orders by
    customer ID. If an order is complete, a check number is entered for
    the corresponding line item, otherwise it is left blank.
    My code uses the following code to display the form. All are
    display fields only, except for the last one, where the check
    number can be entered.
    <cfoutput query="qryDetail" group="partNumber">
    <tr>
    <td valign="top" class="TitleText"
    align="center">#lineItem#</td>
    <td valign="top" class="TitleText"
    align="center">#OrderNumber#</td>
    <td valign="top" class="TitleText"
    align="center">#partNumber#</td>
    <td valign="top" class="TitleText"
    align="center">#dollarformat(qryDetail.unitValue)#</td>
    <td valign="top" class="TitleText" align="center">
    <cfinput type="text" name="checkNumber#keyID#">
    <input type="hidden" name="keyID"
    value="#qryDetail.keyID#">
    </td>
    I use something like the following to update the table with
    the check numbers entered.
    <cfloop index="KeyID" list="#form.KeyID#"
    delimiters=",">
    <cfquery name="qryUpdate" datasource="dbName">
    update tblChecks
    set checkNumber = '#Evaluate("form.checkNumber#KeyID#")#'
    where custID = '#form.custID#'
    and KeyID = '#KeyID#'
    </cfquery>
    </cfloop>
    Now we have another table that will contain the customer
    order history. If the check number was entered for a particular
    line item, I need to insert that line item nubmer into this table,
    along with some other columns. I tried to use the same loop, then
    other loops, but cannot seem to get this to work. Seems simple
    enough, but I obvisouly am missing something.
    How would I insert the line item number (only if a check
    number was entered for that line item) into the table ?

    Here is the code with the queries commented out :
    <cfloop list="#form.fieldnames#" index="field">
    <cfif left(field, 11) is "checkNumber" AND
    len(trim(form[field]))>
    <cfset keyID = listlast(field, '_')>
    <cfset lineItem = listgetat(field, 2, '_')>
    <cfset checknum = form[field]>
    <!---cfquery name="qryUpdate" datasource="dbName">
    UPDATE tblChecks
    SET checkNumber = '#checknum#'
    WHERE custID = #form.custID#
    AND KeyID = #keyid#
    </cfquery--->
    <cfoutput> loop is
    field: <b>#field#</b><br>
    checknum: #checknum#<br>
    lineitem: #lineitem#<br>
    keyID: #keyID#<br>
    </cfoutput>
    <cfelse>
    <cfoutput>Else is
    field: <b>#field#</b><br>
    form[field]: #form[field]#<br>
    len: #len(trim(form[field]))#<br>
    </cfoutput><cfabort>
    </cfif>
    </cfloop>
    This is the output. If I do not put in cfabort, the code just
    drops thru and I never see any output display, so I use cfabort to
    stop so I can see the output.
    loop is field: CHECKNUMBER_11_218
    CHECKNum: xxxxxxxxxxxxxxxxxxxx
    lineitem: 11
    keyID: 218
    Else is field: CHECKNUMBER_1_24
    form[field]:
    I entered the x's into checknum for line item 11, so that is
    correct.
    I then took out the comments from the update query and tried
    it again and it updated for line item 11 (you were right, I had to
    take out the single quotes in the query). I then removed the
    commets for the insert query and it did not insert. I tried the
    whole thing again and tried to add to line item 10 and it dropped
    straight to the else part, displaying :
    Else is field: CHECKNUMBER_1_24
    form[field]:
    len: 0
    So it seems the if statement if failing the second time thru
    the loop :
    <cfif left(field, 11) is "checkNumber" AND
    len(trim(form[field]))>
    This is my input statement :
    <cfinput type="text"
    name="checkNumber_#lineItem#_#keyID#">
    I am really confused now. It seems to work the first time
    thru the loop, then the second time it fails.

  • How to insert date value into oracle?

    hi,
    iam reading date from xml using vb.net and inserting it into oracle table.
    the date value in xml file is in the format of "01012003".
    i want to insert into oracle table.but iam getting an error "ORA-1843: not a valid month".
    how to solve this problem.
    Any suggestions or examples...

    That's not a date. It's just a string. Convert it to a date using,
    DateTime d = DateTime.ParseExact("01022003", "MMddyyyy", null);
    or
    Dim d As DateTime = DateTime.ParseExact("01022003", "MMddyyyy", Nothing)
    and then bind it to a parameter. ODP.NET will take it from there.
    You should never be hard-coding the date literal into your SQL query.
    David

  • How to insert object values into table.

    Hi All,
    I have a problem with passing java object to procedure. Procedure is running properly when I execute in oracle,but it is not executing when I call from Java.
    I am getting Error :
    java.sql.SQLException: invalid name pattern: Pkg_Bulk_Insert.ITW_EMP_OBJ_ARRAY
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
         at oracle.jdbc.oracore.OracleTypeADT.initMetadata(OracleTypeADT.java)
         at oracle.jdbc.oracore.OracleTypeADT.init(OracleTypeADT.java)
         at oracle.sql.ArrayDescriptor.initPickler(ArrayDescriptor.java)
         at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java)
         at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java)
         at JavaObjectToOracle.main(JavaObjectToOracle.java:31)
    Here I am copying my procedure,oracle version is 9i.
    Package specification:
    CREATE OR REPLACE PACKAGE Pkg_Bulk_Insert AS
    TYPE ITW_EMP_OBJ_ARRAY IS VARRAY(20) OF VARCHAR2(200);
    PROCEDURE BULK_INSERT_TEST(strTable IN ITW_EMP_OBJ_ARRAY);
    END Pkg_Bulk_Insert;
    package body:
    CREATE OR REPLACE PACKAGE BODY Pkg_Bulk_Insert AS
    PROCEDURE BULK_INSERT_TEST(strTable IN ITW_EMP_OBJ_ARRAY) AS
    i BINARY_INTEGER;
    BEGIN
    FORALL i IN 1..strTable.COUNT
    INSERT INTO TEMP(NAME)
    VALUES(strTable(i));
    COMMIT;
    END BULK_INSERT_TEST;
    END Pkg_Bulk_Insert;
    Here I am invoking the procedure:
    DECLARE
    x Pkg_Bulk_Insert.ITW_EMP_OBJ_ARRAY;
    BEGIN
    x := Pkg_Bulk_Insert.ITW_EMP_OBJ_ARRAY('A','B','C');
    Pkg_Bulk_Insert.BULK_INSERT_TEST(x);
    DBMS_OUTPUT.PUT_LINE('AFTER INSERTION');
    END;
    Please any body can help me on this regard.

    Your PL/SQL seems reasonable.
    My suspicion would be that the oracle.sql.ArrayDescriptor.createDescriptor class only supports persistent collection types, i.e. those declared at the schema level with CREATE TYPE.

  • Sqlloader: how to insert -ve value into table

    hi..
    i had problem during loading. The error is Record 1: Rejected - Error on table FILE01, column AMOUNT.
    ORA-01722: invalid number
    For AMOUNT, the datatype is number(20,2).
    here is my .ctl
    LOAD DATA
    INFILE 'file1bp0103.txt'
    BADFILE 'file01.bad'
    APPEND
    INTO TABLE file01
    acct_no POSITION(01:13),
    amount POSITION(14:28),
    description POSITION(29:32)
    my .dat file
    A500000030401- 32.74PYMT
    A500000320106- 46.95PYMT
    A500000520408- 63.95PYMT
    A500000610301- 12.99PYMT
    A500001720110- 56.21PYMT
    A500001800103- 55.65PYMT
    A500002000109- 27.25PYMT
    A500002000305- 53.35PYMT
    A500002080210- 75.04PYMT
    A500002250106- 103.38PYMT
    A500002500104- 60.69PYMT
    A500002620902- 509.77PYMT
    A500002621010- 398.69PYMT
    what is the problem? is it because of my datatype?
    please help me..
    TQ

    Is there a need to use dynamic sql here?
    at the very least, try using bind variables instead of concatenating values like that.
    EXECUTE IMMEDIATE 'insert into your_table (column_list) values (:val1, :val2, ...)'
    USING l_val1, l_val2, l_val3 ... ;

  • How to insert new value into an array

    I have an already declared array (including the size) and want to write a method for inserting a new value. Do I have to re-declare the array to the new size? ie old size + 1, then add the new value or is there a java method for this. I can't find one.
    Thanks in advance....
    Mike

    Hi,
    there is no method for that. Look up class Vector. That class implements automatic growing of the Vector.
    Phil

  • How to put the SQL-statement returned value into the field (as a default)

    Hi,
    I am using Developer/2000 (Forms Designer) under windows 98.
    Please tell me how to put the SQL-statement value (as a default value) into the field before enter-query mode. Noted that I have tried the following ways but still some problems:-
    1) Place the SQL-statement into PRE_QUERY trigger in the form/block level.
    There is a message box which ask 'Do you want to save the changes?'.
    2) Place the SQL-statement before execute enter_query. There is still a
    message box which ask 'Do you want to save the changes?'.
    Any hints? Thanks. Urgent.

    solved it!
    1) Suppress DEFAULT save message
    if form_failure then
    raise form_trigger_failure;
    end if;
    2) Place the default value before enter-query.
    Ref: Title='Default value in query field in ENTER_QUERY mode' in designer forum by CVZ
    form level trigger
    ============
    WHEN-NEW-ITEM-INSTANCE
    =======================
    if :system.mode = 'ENTER-QUERY' then
    :block.item := 'default waarde';
    end if;
    3) Suppress the changes whenever leaving the default field.
    if :block.item is null then
    -- assign statement
    end if;

  • SQL Server 2012 Management Studio: Creating a Database and a dbo Table. Inserting VALUES into the table. How to insert 8 Values for future use in XQuery?

    Hi all,
    In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'MacLochlainnsDB')
    DROP DATABASE MacLochlainnsDB
    GO
    CREATE DATABASE MacLochlainnsDB
    GO
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL)
    INSERT INTO marvel
    (avenger_name)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8)
    I got the following error Message:
    Msg 110, Level 15, State 1, Line 5
    There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
    How can I correct this problem?
    Please kindly help and advise.
    Thanks in advance,
    Scott Chang
    P. S.
    The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
    You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
    DECLARE @x xml;
    SET @x = N'<marvel>
    <avenger_name>Captain America</avenger_name>
    </marvel>';
    SELECT @x.query('/*');
    You can query the avenger_name elements from the marvel_xml table with the following syntax:
    SELECT xml_table.query('/marvel/avenger_name')
    FROM marvel_xml;
    It returns the following set of avenger_name elements:
    <avenger_name>Hulk</avenger_name>
    <avenger_name>Iron Man</avenger_name>
    <avenger_name>Black Widow</avenger_name>
    <avenger_name>Thor</avenger_name>
    <avenger_name>Captain America</avenger_name>
    <avenger_name>Hawkeye</avenger_name>
    <avenger_name>Winter Soldier</avenger_name>
    <avenger_name>Iron Patriot</avenger_name>
    You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
    SELECT xml_table.query('/marvel[4]/avenger_name')
    FROM marvel_xml;
    It returns the following avenger_name element:
    <avenger_name>Thor</avenger_name>

    Hi Scott,
    The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
    object within it.
    To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
    Open SQL Server Management Studio
    --> Go to Object explorer(the left panel by default layout)
    --> Extend "Security"
    --> Extend "Logins"
    --> Right click on your login, click "propertites"
    --> Choose the "Default database" at the bottom of the pop-up window.
    --or simply by T-SQL
    Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
    Regarding your question, you can reference the below.
    SELECT * FROM master.sys.all_objects where name ='Marvel'
    --OR
    SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
    --usually the OBJECT_ID is used if a if statement as below
    IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
    PRINT ('TABLE EXISTS') --Or some other logic
    What is the sys.all_objects? See
    here.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to insert a value from sequence in Bussiness Components?

    How to insert a value from sequence in Bussiness Components?
    I would like to do it, but without a triger that would do it before insert.
    I know that there is a type DBSequence in BC where you can insert a sequence name but it does not work when I type there my sequence name.
    Do you now how to fix that problem?
    Bart.

    The newer way to do it is to make the type DBSequence and enter the name of the Sequence object in the sequence field. It must match the same name of the sequence object in the database. Next, you have to create a before insert for each row trigger on the table. Basically, something like this:
    CREATE OR REPLACE TRIGGER TGB_THEME_SEQ
    BEFORE INSERT ON THEME
    FOR EACH ROW
    DECLARE
    BEGIN
    -- Assign the id from the sequence if null
         IF( :new.theme_id IS NULL ) THEN
              SELECT THEME_ID_SEQ.nextval
              INTO :new.theme_id
              FROM dual;
         END IF;
    END;
    In the above example, THEME_ID_SEQ is the seuence object name in the database. If you have the name right but it still fails, then the user you are logging in as probably doesn't have access to the sequence in the database.
    Hope this helps.
    Erik

  • Multiple Checkbox Values Into One Field

    Hopefully someone can help me with this issue I'm having.
    I'm trying to save the values of multiple selected checkboxes into one field separated by commas through ADDT's Insert Transaction code. I can do this easily with DW's standard insert record wizard by using the PHP implode() function but I haven't been able to figure it out with ADDT's code.
    <form>
    <input type="checkbox" value="1" name="program[]" /> Program One
    <input type="checkbox" value="2" name="program[]" /> Program Two
    <input type="checkbox" value="3" name="program[]" /> Program Three
    <input type="checkbox" value="4" name="program[]" /> Program Four
    </form>
    THIS IS ADDT'S CODING
    $ins_quoteManager->addColumn("programs", "STRING_TYPE",  "POST", "programs");
    THIS WORKS VIA DREAMWEAVER'S INSERT RECORD WIZARD
    Original: GetSQLValueString($_POST['programs'], "text"),
    Modified: GetSQLValueString(implode(',',$_POST['programs']), "text"),
    Anyone know how to modify the ADDT code with the implode function to get this to work?

    Have you tried ADDT´s "comma-separated checkboxes" form control, which will also store the values into a field of your choice (and of course retrieve them from there on update record - pages) ? The only possible drawback might be, that the checkboxes can´t be defined statically, means that the array of value/label - pairs will be retrieved from another table by establishing an additional recordset.
    Cheers,
    Günter

  • Inserting a Value into otherTable using an App. Proc. from a Date Picker

    I'm trying to call an Application Process that will insert an Attribute of a Row, into another table, after selecting a date from a Date Picker cell.
    I don't know why this shouldn't be possible. I think I've got all of my "Ducks in a Row", so to speak,
    but the Value that is being inserted into the other table is this:.. [object HTMLTableCellElement]
    (Ultimately, I'd like my Application Process to include Page element values with the insert as well, but I'm trying to handle one problem at a time)
    Here's a list of all the steps I've covered:
    1. I've Created an Application Process, (popDevices). The Process Point is "On-Demand". The Type is "PL/SQL Anonymous Block".
    The Process is defined as such:
    BEGIN
    Insert into P_DEVICES
    NAME,
    IP_ADDRESS,
    MODEL
    ) values
    'Unassigned',
    'Unassigned',
    :P153_MODEL
    COMMIT;
    END;
    2. I've Included the Javascript in the Page HTML Header.
    The Javascript is written as such: (minus the tags)
    function popDevices(PART_NO)
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=popDevices',0);
    get.add('P153_MODEL',PART_NO);
    gReturn = get.get();
    get = null;
    3. I've included the following in the "Element Attributes" field of the Date-Picker Item (Date_Delivered).
    The Region Type is "SQL Query (Updatable Report)"
    onChange="javascript:popDevices(PART_NO);"
    THE RESULTS
    A. A row does get inserted into the other (P_Devices) table,
    But the value of the Attribute from the Page Region is not valid.
    The Inserted value is this: [object HTMLTableCellElement]
    B. I have tried Every conceivable combination of characters in the "Element Attributes" field, such as:
    ...(PART_NO), (#PART_NO#), (||PART_NO||), (+PART_NO+)
    C. The Javascript in the Page HTML Header appears to be correct, since I have written it this same way for other applications without any problems.
    D. If this simply cannot be done by referencing the "onChange" Javascript from the "Element Attributes" field,
    Then can you help me to write the code into the Select statement of the region.
    Thanks for any help you can give me.
    -Gary

    This may not be the most direct approach to the solution. But, none the less, it is a solution.
    For those other novices, like myself, I hope this can be useful at some point in your development:
    MY DESIRED RESULT:
    A. To Insert into another tablle values derived from both; Page Item (i.e. P153_x) and Attributes of a Row in an Updatable Report from which I have selected the Date-Picker.
    B. I want the insert to occur automatically after the user Selects the date from the Date-Picker.
    SOLUTIONS:
    1. I usea Javascript prompt window to prompt for information and store the information in Pre-Created Page Items.
    This is the Javascript as I've entered it into the Page HTML Header region: (Minus the Tags)
    function received_javaprompt () {
    var Serial_Number = prompt("Enter the Serial Number");
    var Bldg_Id = prompt("Enter the Bldg_Id");
    var Clst_Id = prompt("Enter the Clst_Id");
    $x('P153_SERIAL_NO').value = Serial_Number;
    $x('P153_BLDG_ID').value = Bldg_Id;
    $x('P153_CLST_ID').value = Clst_Id;
    2. I needed to identify the (Manufacturer and Part_No) Column Attribute in the Row from which I selected the Date-Picker.
    A. To do this, I enumerated the Columns in the order they were listed in the Select Statement of the region (Click on the Region Definition Tab).
    B. Then (Click on the Report Attributes Tab). Count, In the numerical order which these columns are selected, ONLY the columns that are Editable.
    C. When I counted down as far as the Column I wanted to capture the value of, Then I made a mental note of that number and used it in the following (2) Javascripts (findMaker and findModel).
    3. findMaker (Minus the tags)
    function findMaker (pThis) {
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    var Maker = html_GetElement('f15_'+vRow).value
    $x('P153_MAKER').value = Maker;
    4. findModel (Minus the tags)
    function findModel (pThis) {
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    var Model = html_GetElement('f16_'+vRow).value
    $x('P153_MODEL').value = Model;
    5. I added one more Javascript, to the Page HTML Header, that references the Application Process which will Insert the values into the "Other" table:
    function popDevices(P153_SERIAL_NO,P153_BLDG_ID,P153_CLST_ID,P153_MAKER,P153_MODEL)
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=popDevices',0);
    get.add('P153_SERIAL_NO',P153_SERIAL_NO);
    get.add('P153_BLDG_ID',P153_BLDG_ID);
    get.add('P153_CLST_ID',P153_CLST_ID);
    get.add('P153_MAKER',P153_MAKER);
    get.add('P153_MODEL',P153_MODEL);
    gReturn = get.get();
    get = null;
    6. I added the "onChange" process to the Element Attributes field of the Table item which utilizes the Date-Picker:
    A. Click on the Report Attributes Tab of the Region.
    B. Click on the Edit icon of the column which utilized the Date-Picker
    C. I added this "onChange" reference to the Element Attributes field, which is found in the Tabular Form section.
    onChange="javascript:received_javaprompt();findModel(this);findMaker(this);popDevices((P153_SERIAL_NO).value,(P153_BLDG_ID).value,(P153_CLST_ID).value,(P153_MAKER).value,(P153_MODEL).value);"
    7. The Application Process which inserts the collected data into the table is as follows:
    (Name= popDevices: Process Point= On-Demand: Type= PL/SQL Anonymous Block)
    BEGIN
    Insert into P_DEVICES
    BLDG_ID,
    CLST_ID,
    NAME,
    IP_ADDRESS,
    SERIAL_NO,
    MAKER,
    MODEL
    ) values
    :P153_BLDG_ID,
    :P153_CLST_ID,
    'Unassigned',
    'Unassigned',
    :P153_SERIAL_NO,
    :P153_MAKER,
    :P153_MODEL
    COMMIT;
    END;
    Well, I hope this may help someone else like me.
    I usually arrive at my solutions by getting help here on the Discussion Forum and also Google. Google inevitably points me to a previous Apex Discussion Forum session.
    Edited by: garyNboston on Mar 15, 2010 10:55 AM

  • Cannot insert Chinese character into nvarchar2 field

    I have tested in two environments:
    1. Database Character Set: ZHS16CGB231280
    National Character Set: AL16UTF8
    If the field type of datatable is varchar2 or nvarchar2, the provider can read and write Chinese correctly.
    2. Database Character Set:WE8MSWIN1252
    National Character Set: AL16UTF8
    The provider can not read and write Chinese correctly even the field type of datatable is nvarchar2
    I find that for the second one, both MS .NET Managed Provider for Oracle and Oracle Managed Data Provider cannot read and write NCHAR or NVARCHAR2 fields. The data inserted into these fields become question marks.
    Even if I changed the NLS_LANG registry to SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280, the result is the same.
    For the second situation, only after I change the Database Character Set to ZHS16CGB231280 with ALTER DATABASE CHARACTER SET statement, can I insert Chinese correctly.
    Does any know why I cannot insert Chinese characters into Unicode fields when the Database Character Set is WE8MSWIN1252? Thanks.
    Regards,
    Jason

    Hi Jason,
    First of all, I am not familiar with MS .NET Managed Provider for Oracle or Oracle Managed Data Provider.
    How did you insert these Simplified Chinese characters into the NVARCHAR2 column ? Are they hardcoded as string literals as part of the SQL INSERT statement ? If so, this could be because, all SQL statements are converted into the database character set before they are parsed by the SQL engine; hence these Chinese characters would be lost if your db character set was WE8MSWIN1252 but not when it was ZHS16CGB231280.
    Two workarounds, both involved the removal of hardcoding chinese characters.
    1. Rewrite your string literal using the SQL function UNISTR().
    2. Use bind variables instead of text literals in the SQL.
    Thanks
    Nat

Maybe you are looking for