Loading 2-dimensional string table

I should read data and assign to 2-dimensional string array(or other data structure).
Data sample is like following pattern.
ENGLISH                 GERMAN
First Name               Vorname
Last Name               Nachname
Address                   Anschrift
Phone                     Telefon
I want to use this 2-dimensional data as a global variable from any other class.
So I made a static class.
How do I define this data in the static class?

One of the approaches:
public
class
Translation
public
string English {
get;
set; }
public
string German {
get;
set; }
static
List<Translation>
mTranslations = new
List<Translation>();
mTranslations.Add(
new
Translation { English =
"First Name", German =
"Vorname" } );
mTranslations.Add(
new
Translation { English =
"Last Name", German =
"Nachname" } );
Depending on other details, it is also possible to define a constructor, limit the write access, use
struct or string[,], and so on.

Similar Messages

  • Initial load of small target tables via flashback query?

    A simple question.
    Scenario: I’m currently building a near real time warehouse, streaming some basic facts and dimension tables between two databases. I’m considering building a simple package to "reset" or reinitialize the dimensions an all-round fix for variety of problem scenarios (since they are really small, like 15 000 rows each). The first time I loaded the target tables I utilized data pump with good success, however since streams transforms data on the way a complete reload is somewhat more complex.
    Considered solution: Ill just write a nice flashback query via db-link fetching data from a specific (recent) SCN and then I reinitialize the table on that SCN in streams...
    Is this a good idea? Or is there something obvious like a green and yellow elephant in the gift shop that I overlooked? Why I’m at all worried is because in the manuals this solution is not mention among the supported ways to do the initial load of a target table and I’m thinking there is a reason for this?

    I have a series of streams with some tranformations feeding rather small dimensional tables, I want to make this solution easy to manage even when operations encounter difficult replication issues, so Im developing a PL/SQL package that will:
    1) Stop all streams
    2) Clear all errors
    3) Truncate target tables
    4) Reload them including transformation (using a SELECT AS OF "ANY RECENT SCN" from target to source over dblink)
    5) Using this random recent SCN I will re-instantiate the tables
    6) Start all streams
    As you see datapump even if it works is rather difficult to utilize when you tranform data from A to B, using AS OF I not only get a constant snapshot from the source, I also get the exact SCN for it.
    What do you think? Can I safely use SELECT AS OF SCN instead of datapump with SCN and still get a consisten sollution?
    For the bigger FACT tables im thinking about using the same SELECT AS OF SCN but there with particular recent paritions as targets only and thus not having to reload the whole table.
    Anyways this package would ensure operations that they can recover from any kind of disaster or incomplete recovery on both source and target databases, and just re-instantiate the warehouse within minutes.

  • Using FDM to load data from oracle table (Integration Import Script)

    Hi,
    I am using Integration Import Script to load data from oracle table to worktables in FDM.
    i am getting following error while running the script.
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
    Attaching the full error report
    ERROR:
    Code............................................. -2147217887
    Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    At line: 22
    Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
    Component........................................ upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 6260
    IDENTIFICATION:
    User............................................. ******
    Computer Name.................................... *******
    App Name......................................... FDMAPP
    Client App....................................... WebClient
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... DBNAME
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... SCRTEST
    Location ID...................................... 750
    Location Seg..................................... 4
    Category......................................... FDM ACTUAL
    Category ID...................................... 13
    Period........................................... Jun - 2011
    Period ID........................................ 6/30/2011
    POV Local........................................ True
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False
    I am using the following script
    Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
    'Oracle Hyperion FDM Integration Import Script:
    'Created By:     Dhananjay
    'Date Created:     1/17/2012 10:29:53 AM
    'Purpose:A test script to import data from Oracle EBS tables
    Dim cnSS 'ADODB.Connection
    Dim strSQL 'SQL string
    Dim rs 'Recordset
    Dim rsAppend 'tTB table append rs object
    'Initialize objects
    Set cnSS = CreateObject("ADODB.Connection")
    Set rs = CreateObject("ADODB.Recordset")
    Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
    'Connect to SQL Server database
    cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
    'Create query string
    strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
    'Get data
    rs.Open strSQL, cnSS
    'Check for data
    If rs.bof And rs.eof Then
    RES.PlngActionType = 2
    RES.PstrActionValue = "No Records to load!"
    Exit Function
    End If
    'Loop through records and append to tTB table in location’s DB
    If Not rs.bof And Not rs.eof Then
    Do While Not rs.eof
    rsAppend.AddNew
    rsAppend.Fields("PartitionKey") = RES.PlngLocKey
    rsAppend.Fields("CatKey") = RES.PlngCatKey
    rsAppend.Fields("PeriodKey") = RES.PdtePerKey
    rsAppend.Fields("DataView") = "YTD"
    rsAppend.Fields("CalcAcctType") = 9
    rsAppend.Fields("Amount") = rs.fields("Amount").Value
    rsAppend.Fields("Desc1") = rs.fields("Description").Value
    rsAppend.Fields("Account") = rs.fields("Account").Value
    rsAppend.Fields("Entity") = rs.fields("Entity").Value
    rsAppend.Update
    rs.movenext
    Loop
    End If
    'Records loaded
    RES.PlngActionType = 6
    RES.PstrActionValue = "Import successful!"
    'Assign Return value
    SQLIntegration = True
    End Function
    Please help me on this
    Thanks,
    Dhananjay
    Edited by: DBS on Feb 9, 2012 10:21 PM

    Hi,
    I found the problem.It was because of the connection string.The format was different for oracle tables.
    PFB the format
    *cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
    And thanks *SH* for quick response.
    So closing the thread......
    Thanks,
    Dhananjay

  • Loading a long string from a CSV

    I'm loading data from a third party CSV file which contains a field which could be up to 8000 characters long. If I put varchar2(8000) into the model for the file I get error ORA-00910 as varchar2 can only be up to 4000 characters long.
    Is there a way of telling the ODI model for the file that the column is a CLOB field rather than varchar2(8000)?
    Ironically, it's a column I'm not actually loading into the target table!

    Hi,
    We do this thing every morning. The source datastore is a file with a string(8000) column. The target datastore is Oracle with CLOB column. The size has never been a problem.

  • Loading data from one table to another using cursor

    Hi,
    I have given the below command to load the data from 1 table to another using cursor.
    declare
    cursor mycursor IS
    SELECT extract_name,from_date,to_date,BETA from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';
    Begin
    for mycursor_1 IN mycursor loop
    insert into tmp_tab columns(col1,col2,col3,col5) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA);
    End loop;
    commit;
    end;
    It is working fine.
    But I want to hard code some of the columns ( like flags ) which are not there in 1st table and load them into 2nd table.
    In db2 we will give commands like
    varSqlStatus=`db2 "declare mycurs cursor for select extract_name,from_date,to_date,BETA,'N','Y' from temp_table"`
    varSqlStatus=`db2 "load from mycurs of cursor modified by identityignore insert into tmp_tab(col1,col2,col3,col5,col6,col7) nonrecoverable"`
    But I want it in oracle 10g, Can any one help me in this.

    Have you tried either of the two options :
    1. Modify the CURSOR itself :
    cursor mycursor IS
    SELECT extract_name,from_date,to_date,BETA,'N','Y' from temp_table where EXTRACT_NAME='GIFTCARD_DETAILS';2. Modify the INSERT statement itself :
    insert into tmp_tab columns(col1,col2,col3,col5,col6,col7) values(mycursor_1.EXTRACT_NAME,mycursor_1.from_date,mycursor_1.to_date,mycursor_1.BETA,'N','Y');

  • Load data from one table to another

    Hi all,
    Please help me for my below requirement.
    Oracle version : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    Rules
    1) First two city's should be loaded in city_1 and city_2.
    2) If there are more two cities, only first two should be loaded.
    3) If only one city_1 has value, it should be loaded in city_1.
    drop table seven_cities;
    create table seven_cities
    (id     number,
    city_1  varchar2(100),
    city_2  varchar2(100),
    city_3  varchar2(100),
    city_4  varchar2(100),
    city_5  varchar2(100),
    city_6  varchar2(100),
    city_7  varchar2(100)
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (1,'New York',null,null,null,'Chicago',null,null);
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (2,null,'Hyderabad','Delhi','Mumbai',null,null,null);
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (3,null,null,null,null,null,null,'London'); 
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (4,null,null,null,'Sydeny','Melbourne','Paris','Berlin');
    commit;
    select * from seven_cities;
    drop table two_cities;
    create table two_cities
    (id number,
    city_1  varchar2(100),
    city_2  varchar2(100));
    Expected data to be loaded
    id       city_1          city_2
    1     New York             Chicago
    2     Hyderabad             Delhi
    3     London          null
    4     Sydney          MelbourneThanks
    Raghu

    select  id,
            coalesce(city_1,city_2,city_3,city_4,city_5,city_6,city_7) city_1,
            nvl2(
                 city_1,
                 coalesce(city_2,city_3,city_4,city_5,city_6,city_7),
                 nvl2(
                      city_2,
                      coalesce(city_3,city_4,city_5,city_6,city_7),
                      nvl2(
                           city_3,
                           coalesce(city_4,city_5,city_6,city_7),
                           nvl2(
                                city_4,
                                coalesce(city_5,city_6,city_7),
                                nvl2(
                                     city_5,
                                     coalesce(city_6,city_7),
                                     nvl2(
                                          city_6,
                                          city_7,
                                          null
                ) city_2
      from  seven_cities
    ID CITY_1     CITY_2
      1 New York   Chicago
      2 Hyderabad  Delhi
      3 London
      4 Sydeny     Melbourne
    SQL>  SY.

  • How to Load data from a Table in BW to R3 Table .. any FM or Program if you

    I want to load data from a Table in BW side to R3 side. Any FM or Program if you Know.

    If it is one time activity ..Download the data into excel file on BW side..
    Write an ABAP program to read the data from the excel file on local workstation and update table..

  • Initial load failing between identical tables. DEFGEN skewed and fixable?

    Initial load failing between identical tables. DEFGEN skewed and fixable?
    Error seen:
    2013-01-28 15:23:46 WARNING OGG-00869 [SQL error 0 (0x0)][HP][ODBC/MX Driver] DATETIME FIELD OVERFLOW. Incorrect Format or Data. Row: 1 Column: 11.
    Then compared the discard record against a select * on the key column.
    Mapping problem with insert record (target format)...
    **** Comparing Discard contents to Select * display
    ABCHID = 3431100001357760616974974003012 = 3431100001357760616974974003012
    *!!! ABCHSTEPCD = 909129785 <> 9 ???*
    ABCHCREATEDDATE = 2013-01-09 13:43:36 = 2013-01-09 13:43:36
    ABCHMODIFIEDDATE = 2013-01-09 13:43:36 =2013-01-09 13:43:36
    ABCHNRTPUSHED = 0 = 0
    ABCHPRISMRESULTISEVALUATED = 0 = 0
    SABCHPSEUDOTERM = 005340 = 005340
    ABCHTERMID = TERM05 = TERM05
    ABCHTXNSEQNUM = 300911112224 = 300911112224
    ABCHTIMERQSTRECVFROMACQR = 1357799914310 = 1357799914310
    *!!! ABCTHDATE = 1357-61-24 00:43:34 <> 2013-01-09 13:43:34*
    ABCHABCDATETIME = 2013-01-09 13:43:34.310000 = 2013-01-09 13:43:34.310000
    ABCHACCOUNTABCBER =123ABC = 123ABC
    ABCHMESSAGETYPECODE = 1210 = 1210
    ABCHPROCCDETRANTYPE = 00 = 00
    ABCHPROCCDEFROMACCT = 00 = 00
    ABCHPROCCDETOACCT = 00 = 00
    ABCHRESPONSECODE = 00 = 00
    …. <snipped>
    Defgen comes out same when run against either table.
    Also have copied over and tried both outputs from DEFGEN.
    +- Defgen version 2.0, Encoding ISO-8859-1
    * Definitions created/modified 2013-01-28 15:00
    * Field descriptions for each column entry:
    * 1 Name
    * 2 Data Type
    * 3 External Length
    * 4 Fetch Offset
    * 5 Scale
    * 6 Level
    * 7 Null
    * 8 Bump if Odd
    * 9 Internal Length
    * 10 Binary Length
    * 11 Table Length
    * 12 Most Significant DT
    * 13 Least Significant DT
    * 14 High Precision
    * 15 Low Precision
    * 16 Elementary Item
    * 17 Occurs
    * 18 Key Column
    * 19 Sub Data Type
    Database type: SQLMX
    Character set ID: ISO-8859-1
    National character set ID: UTF-16
    Locale: en_EN_US
    Case sensitivity: 14 14 14 14 14 14 14 14 14 14 14 14 11 14 14 14
    Definition for table RT.ABC
    Record length: 1311
    Syskey: 0
    Columns: 106
    ABCHID 64 34 0 0 0 0 0 34 34 34 0 0 32 32 1 0 1 3
    ABCHSTEPCD 132 4 39 0 0 0 0 4 4 4 0 0 0 0 1 0 0 0
    ABCHCREATEDDATE 192 19 46 0 0 0 0 19 19 19 0 5 0 0 1 0 0 0
    ABCHMODIFIEDDATE 192 19 68 0 0 0 0 19 19 19 0 5 0 0 1 0 0 0
    ABCHNRTPUSHED 130 2 90 0 0 0 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPRISMRESULTISEVALUATED 130 2 95 0 0 0 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPSEUDOTERM 0 8 100 0 0 0 0 8 8 8 0 0 0 0 1 0 0 0
    ABCTERMID 0 16 111 0 0 0 0 16 16 16 0 0 0 0 1 0 0 0
    ABCHTXNSEQNUM 0 12 130 0 0 0 0 12 12 12 0 0 0 0 1 0 0 0
    ABCHTIMERQSTRECVFROMACQR 64 24 145 0 0 0 0 24 24 24 0 0 22 22 1 0 0 3
    ABCTHDATE 192 19 174 0 0 0 0 19 19 19 0 5 0 0 1 0 0 0
    ABCHABCDATETIME 192 26 196 0 0 1 0 26 26 26 0 6 0 0 1 0 0 0
    ABCHACCOUNTABCER 0 19 225 0 0 1 0 19 19 19 0 0 0 0 1 0 0 0
    ABCHMESSAGETYPECODE 0 4 247 0 0 1 0 4 4 4 0 0 0 0 1 0 0 0
    ABCHPROCCDETRANTYPE 0 2 254 0 0 1 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPROCCDEFROMACCT 0 2 259 0 0 1 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHPROCCDETOACCT 0 2 264 0 0 1 0 2 2 2 0 0 0 0 1 0 0 0
    ABCHRESPONSECODE 0 5 269 0 0 1 0 5 5 5 0 0 0 0 1 0 0 0
    … <snipped>
    The physical table shows a PACKED REC 1078
    And table invoke is:
    -- Definition of table ABC3.RT.ABC
    -- Definition current Mon Jan 28 18:20:02 2013
    ABCHID NUMERIC(32, 0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHSTEPCD INT NO DEFAULT HEADING '' NOT NULL NOT
    DROPPABLE
    , ABCHCREATEDDATE TIMESTAMP(0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHMODIFIEDDATE TIMESTAMP(0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHNRTPUSHED SMALLINT DEFAULT 0 HEADING '' NOT NULL NOT
    DROPPABLE
    , ABCHPRISMRESULTISEVALUATED SMALLINT DEFAULT 0 HEADING '' NOT NULL NOT
    DROPPABLE
    , ABCHPSEUDOTERM CHAR(8) CHARACTER SET ISO88591 COLLATE
    DEFAULT NO DEFAULT HEADING '' NOT NULL NOT DROPPABLE
    , ABCHTERMID CHAR(16) CHARACTER SET ISO88591 COLLATE
    DEFAULT NO DEFAULT HEADING '' NOT NULL NOT DROPPABLE
    , ABCHTXNSEQNUM CHAR(12) CHARACTER SET ISO88591 COLLATE
    DEFAULT NO DEFAULT HEADING '' NOT NULL NOT DROPPABLE
    , ABCHTIMERQSTRECVFROMACQR NUMERIC(22, 0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCTHDATE TIMESTAMP(0) NO DEFAULT HEADING '' NOT
    NULL NOT DROPPABLE
    , ABCHABCDATETIME TIMESTAMP(6) DEFAULT NULL HEADING ''
    , ABCHACCOUNTNABCBER CHAR(19) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHMESSAGETYPECODE CHAR(4) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHPROCCDETRANTYPE CHAR(2) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHPROCCDEFROMACCT CHAR(2) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHPROCCDETOACCT CHAR(2) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    , ABCHRESPONSECODE CHAR(5) CHARACTER SET ISO88591 COLLATE
    DEFAULT DEFAULT NULL HEADING ''
    …. Snipped
    I suspect that the fields having subtype 3 just before the garbled columns is a clue, but not sure what to replace with or adjust.
    Any and all help mighty appreciated.

    Worthwhile suggestion, just having difficulty applying.
    I will tinker with it more. But still open to more suggestions.
    =-=-=-=-
    Oracle GoldenGate Delivery for SQL/MX
    Version 11.2.1.0.1 14305084
    NonStop H06 on Jul 11 2012 14:11:30
    Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
    Starting at 2013-01-31 15:19:35
    Operating System Version:
    NONSTOP_KERNEL
    Version 12, Release J06
    Node: abc3
    Machine: NSE-AB
    Process id: 67895711
    Description:
    ** Running with the following parameters **
    2013-01-31 15:19:40 INFO OGG-03035 Operating system character set identified as ISO-8859-1. Locale: en_US_POSIX, LC_ALL:.
    Comment
    Comment
    REPLICAT lodrepx
    ASSUMETARGETDEFS
    Source Context :
    SourceModule : [er.init]
    SourceID : [home/ecloud/sqlmx_mlr14305084/src/app/er/init.cpp]
    SourceFunction : [get_infile_params]
    SourceLine : [2418]
    2013-01-31 15:19:40 ERROR OGG-00184 ASSUMETARGETDEFS is not supported for SQL/MX ODBC replicat.
    2013-01-31 15:19:45 ERROR OGG-01668 PROCESS ABENDING.

  • Transaction data can be loaded into the Fact table without loading the

    Transaction data can be loaded into the Fact table without loading the corresponding master data (Example : Sales analysis transaction data can be loaded without populating any of its  dimension’s master data)
    a.     True
    b.     False

    Hi Kutti,
    True - You need to select the option in the infopackage - alwyas load even if no master data exists.
    Bye
    Dinesh

  • Does the advanced queue support setting the pay load type as array/table?

    Does the advanced queue support setting the pay load type as array/table?
    if yes, how to write the enqueue script, I tried to write the following the script to enqueue, but failed, pls help to review it . Thanks...
    ------Create payload type
    create or replace TYPE "SIMPLEARRAY" AS VARRAY(99) OF VARCHAR(20);
    ------Create queue table
    BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_payload_type => 'LUWEIQIN.SIMPLEARRAY',
    storage_clause => 'PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE USERS',
    Sort_list => 'ENQ_TIME',
    Compatible => '8.1.3');
    END;
    ------Create queue
    BEGIN DBMS_AQADM.CREATE_QUEUE(
    Queue_name => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_type => 0,
    Max_retries => 5,
    Retry_delay => 0,
    dependency_tracking => FALSE);
    END;
    -------Start queue
    BEGIN
    dbms_aqadm.start_queue(queue_name => 'LUWEIQIN.SIMPLEQUEUE', dequeue => TRUE, enqueue => TRUE);
    END;
    -------Enqueue
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    but when I use the following script to enqueue get error. Pls help to review. Thanks...
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help needed to load XML into DB table

    I need some serious help if someone can spare the time. I am completely new to XML and don't really understand it yet but I need to be able to load an XML file (example) below.
    I want to load this into a table that would look like the following:
    CHAPTER_TITLE    DOC_HTML    DOC_TITLE
    Men's Health      494440          AAAAA
    Men's Health      496812          BBBBB
    etc....
    <?xml version=1.0 encoding=utf-8?>
    <BookCollections Quantity=1 Title=Emis Books Collection>
        <Book Folder=PILSS Title=Patient Support>
            <Chapter Title=Men''s Health>
                <Document DocHTML=494440 Title=AAAAA />
                <Document DocHTML=496812 Title=BBBBB />
                <Document DocHTML=498923 Title=CCCCC />
                <Document DocHTML=499844 Title=DDDDD />
                <Document DocHTML=499901 Title=EEEEE />
            </Chapter>
        </Book>
    </BookCollections>I have read through the documentation I could find but I can't get it to work. I had a simple procedure which loaded the text file as a CLOB and then inserted it into an XMLTYPE column but even that wouldn't work. I would rather it loaded as above in seperate columns.
    Is there a simple example someone can help me out with?

    That is very close ORA_SID thank you. But I get the ORA-19025 error when I have more than one Chapter section. The example was a cut down version, ther real file has thousands of Chapters.
    e.g.
      1  insert into test2 values(xmltype(' <BookCollections Quantity="1" Title="Emis Books Collection">
      2  <Book Folder="PILSS" Title="Patient Support">
      3  <Chapter Title="Men''s Health">
      4              <Document DocHTML="494440" Title="AAAAA" />
      5              <Document DocHTML="496812" Title="BBBBB" />
      6              <Document DocHTML="498923" Title="CCCCC" />
      7              <Document DocHTML="499844" Title="DDDDD" />
      8              <Document DocHTML="499901" Title="EEEEE" />
      9              <Document DocHTML="500381" Title="FFFFF" />
    10              <Document DocHTML="500446" Title="GGGGG" />
    11              <Document DocHTML="500996" Title="HHHHH" />
    12          </Chapter>
    13          <Chapter Title="Contraception">
    14              <Document DocHTML="496815" Title="IIIII" />
    15              <Document DocHTML="496817" Title="JJJJJ" />
    16              <Document DocHTML="499547" Title="KKKKK" />
    17              <Document DocHTML="499550" Title="LLLLL" />
    18              <Document DocHTML="500473" Title="MMMMM" />
    19              <Document DocHTML="500704" Title="NNNNN" />
    20              <Document DocHTML="500813" Title="OOOOO" />
    21              <Document DocHTML="500995" Title="PPPPP />
    22              <Document DocHTML="500996" Title="QQQQQ" />
    23          </Chapter>
    24  </Book>
    25  </BookCollections>
    26* '))
    SQL> /
    1 row created.
    SQL> SELECT extractValue(xml_data, '/BookCollections/Book/Chapter/@Title') AS Chapter_Title,
      2  extractValue(value(em), '/Document/@DocHTML') AS Document_DocHTML,
      3  extractValue(value(em), '/Document/@Title') AS Document_Title
      4  FROM test2,table(XMLSequence(extract(xml_data,'/BookCollections/Book/Chapter/Document'))) em
      5  ;
    FROM test2,table(XMLSequence(extract(xml_data,'/BookCollections/Book/Chapter/Document'))) em
    ERROR at line 4:
    ORA-19025: EXTRACTVALUE returns value of only one nodeCan you help on this?

  • Batch load images (tiff) into table with a BLOB column

    Hi,
    Does anyone know any third-party tool/software to bulk/batch load images into Oracle table? There is an ETL software to regularly pull the images (tiff) from a ftp server to a directory in the database server. There is no way I can hardcode the image filenames into the control file and use SQL*Loader to load the files. Is there any tool/software that can just grab whatever files in the directory and load them into Oracle. Then, I can write a program to extract the filename from the file already loaded into the table and update the filename column.
    Thanks.
    Andy

    sound like simple scripting to me...
    -- SQL loader example
    http://www.orafaq.com/wiki/SQL%2ALoader_FAQ#How_does_one_use_SQL.2ALoader_to_load_images.2C_sound_clips_and_documents.3F
    -- dynamically build control file
    devuser1:/tmp>>touch image1.gif
    devuser1:/tmp>>touch image2.jpg
    devuser1:/tmp>>touch image3.jpg
    devuser1:/tmp>>ls -l image*
    -rw-rw-r--   1 devuser1   mygrp           0 Jul 10 11:19 image1.gif
    -rw-rw-r--   1 devuser1   mygrp           0 Jul 10 11:19 image2.jpg
    -rw-rw-r--   1 devuser1   mygrp           0 Jul 10 11:19 image3.jpg
    devuser1:/tmp>>ls -l image* | awk '{ print NR "," $9}'
    1,image1.gif
    2,image2.jpg
    3,image3.jpg
    devuser1:/tmp>>echo "LOAD DATA" > t.ctl
    devuser1:/tmp>>echo "INFILE *" >> t.ctl
    devuser1:/tmp>>echo "..." >> t.ctl
    devuser1:/tmp>>echo "BEGINDATA" >> t.ctl
    devuser1:/tmp>>ls -l image* | awk '{ print NR "," $9}' >> t.ctl
    devuser1:/tmp>>cat t.ctl
    LOAD DATA
    INFILE *
    BEGINDATA
    1,image1.gif
    2,image2.jpg
    3,image3.jpgEdited by: maceyah on Jul 10, 2009 12:42 PM

  • Incremental load into the Dimension table

    Hi,
    I have the problem in doing the incremental load of the dimension table.Before loading into the dimension table,i would like to check the data in the dimnesion table.
    In my dimension table i have one not null surrogate key and the other null dimension tables.The not null surrogate key, i am populating with the Sequence Generator.
    To do the incremental load i have done the following.
    I made lookup into the dimension table and looked for a key.The key from the lookup table i have passed to the expression operator.In the expression operator i have created one field and hard coded one flag based on the key from the lookup table.I passed this flag to the filter operator and rest of the fields from the source.
    By doing this i am not able to pass the new records to the dimension table.
    Can you please help me.
    I have another question also.
    How do i update one not null key in the fact table.
    Thanks
    Vinay

    Hi Mark,
    Thanks for your help to solve my problem.I thought i share more information by giving the sql.
    I am giving below the 2 sqls, i would like to achieve through OWB.
    Both the following tasks need to be accomplished after loading the fact table.
    task1:
    UPDATE fact_table c
    SET c.dimension_table_key =
    (SELECT nvl(dimension_table.dimension_table_key,0)
    FROM src_dimension_table t,
    dimension_table dimension_table
    WHERE c.ssn = t.ssn(+)
    AND c.date_src_key = to_number(t.date_src(+), '99999999')
    AND c.time_src_key = to_number(substr(t.time_src(+), 1, 4), '99999999')
    AND c.wk_src = to_number(concat(t.wk_src_year(+), concat(t.wk_src_month(+), t.wk_src_day(+))), '99999999')
    AND nvl(t.field1, 'Y') = nvl(dimension_table.field1, 'Y')
    AND nvl(t.field2, 'Y') = nvl(dimension_table.field2, 'Y')
    AND nvl(t.field3, 'Y') = nvl(dimension_table.field3, 'Y')
    AND nvl(t.field4, 'Y') = nvl(dimension_table.field4, 'Y')
    AND nvl(t.field5, 'Y') = nvl(dimension_table.field5, 'Y')
    AND nvl(t.field6, 'Y') = nvl(dimension_table.field6, 'Y')
    AND nvl(t.field7, 'Y') = nvl(dimension_table.field7, 'Y')
    AND nvl(t.field8, 'Y') = nvl(dimension_table.field8, 'Y')
    AND nvl(t.field9, 'Y') = nvl(dimension_table.field9, 'Y')
    WHERE c.dimension_table_key = 0;
    fact table in the above sql is fact_table
    dimesion table in the above sql is dimension_table
    source table for the dimension table is src_dimension_table
    dimension_table_key is a not null key in the fact table
    task2:
    update fact_table cf
    set cf.key_1 =
    (select nvl(max(p.key_1),0) from dimension_table p
         where p.field1 = cf.field1
    and p.source='YY')
    where cf.key_1 = 0;
    fact table in the above sql is fact_table
    dimesion table in the above sql is dimension_table
    key_1 is a not null key in the fact table
    Is it possible to achieve the above tasks through Oracle Warehouse builder(OWB).I created the mappings for loading the dimension table and fact table and they are working fine.But the above two queries i am not able to achieve through OWB.I would be thankful if you can help me out.
    Thanks
    Vinay

  • SQL* Loader to load data format into tables??????

    Hi,
    Hai I am very much new to Oracle. I am trying to load data into a table using SQL*Loader and i getting error while it is using the data format.
    the format used in data file is "Sep 6 2001 12:00:00:000AM"
    and when i used to_date( :accountDate, 'YYYY-MM-DD HH:MI:SS AM or PM') function it throws me an exception like
    "ORA-01821: date format not recognized". so anybody can help me to insert data with out changing the data file, whould be really helpfull
    thanks
    vijay

    Also it looks like you need to change your date format mask.
    If your data is formatted as "Sep 6 2001 12:00:00:000AM"
    then you should use to_date( :accountDate, 'Mon DD YYYY HH:MI:SSAM')
    This will work with a two digit second field, but not a three digit second field.

  • READ XML file + XSD file to create an load data in a table

    Hi gurus,
    What way you will use to create and load data in a SQL TABLE by reading xml+xsd files.
    Can you provide my a running example?
    Is it better to stage the XML structure + XML data in the database before creating/loading the real SQL table. (the size of the XML file could me 1GB)

    See the FAQ..
    For very large files make sure
    1. Use FTP to load...
    2. Ensure schema is registered with storeVarrayAsTable="true" and maintainDOM="false'
    3. Install latest 10.2.0.3.0...
    or
    Look for SaxLoader example in the FAQ
    -M

Maybe you are looking for

  • Lightroom 5 - Smart Previews | What's New in Lightroom 5 | Adobe TV

    Learn how to create lightweight, efficient Smart Previews to work with offline images in Lightroom. http://adobe.ly/11rZI6q

  • Powerbook novice - power problem

    hello There, I have just got a secondhand 1.33MHz 15" powerbook G4. The last owner said battery was on its way out but it worked fine with a power adapter. I booted the powerbook up and it started fine and dandy, ran for a couple of minutes and then

  • Access another host on same subnet through Nat'd IP address

    I appreciate any help in advance, I have a requirement to monitor a host's external IP address, the monitoring host (host A) initiating the request is located in the same DMZ subnet as the destination host (host B) I want to monitor, both are NAT'd t

  • Certificate Chain File

    Hello, I have certificates from two different CAs. How can I integrate them both in a root certificate chain file, so that the WLS accepts them both? thnaks for zour help hannele

  • Cannot Delete Adobe Reader 9 Installer after failed download

    I tried to download Adobe Reader 9 and the installation froze around 83%.  After multiple attempts I tried downloading an older version (Adobe 8) and it worked but the installation folder for Adobe 9 is still on my desktop and it will not let me dele