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.

Similar Messages

  • Passing a long string from Vb to stored proc

    Hi,
    I am passing a long string from Vb to this stored proc ..
    defn:
    Create Or Replace Procedure saveTaxFormInDB(intFormUID IN number,
    intCLUID IN number,
    PDFdata IN varchar2,
    Status IN OUT Varchar2) AS
    Problem lies with the string pdfdata. I am sending it from VB as:
    Set cmdParamStr = cmdAdoCmd.CreateParameter("Data", adVarChar,
    adParamInput, 32767, strData)
    I have checked the parameters in VB while sending and I have the
    correct string argument to be passed to "PDFData", But i am not
    sure if it is getting the value correctly.
    Because I know that the code is raising exception while
    accessing PDFData. (eg. in places like insert ..(pdfdata) and
    length(pdfdata)...)
    Please advise how i can solve this problem.
    Please Note that the string is not VERY large. I do not need to
    use LOBS in any way. the string is definitely within the limits
    of varchar2(which i think is 4000 chars.. correct me if i am
    wrong).
    Many thanks

    what is the backend MS SQl server or Oracle.??
    If it is MS SQLSERVER, then
    1.Create a SqlCommand object with the parameters as the name of the stored procedure that is to be executed and the connection object con to which the command is to be sent for execution.
    SqlCommand command = new SqlCommand("Name of StoredProcedure",con);
    2.Change the command objects CommandType property to stored procedure.
    command.CommandType = CommandType.StoredProcedure;
    3.Add the parameters to the command object using the Parameters collection and the SqlParameter class.
    command.Parameters.Add(new SqlParameter("@parametername",SqlDbType.Int,0,"Filedname"));
    4.Specify the values of the parameters using the Value property of the parameters
    command.Parameters[0].Value=4;
    command.Parameters[1].Value="ABC";
    If it is oracle,
    OracleConnection con = new OracleConnection("uid=;pwd=");
    try
    con.Open();
    OracleCommand spcmd = new OracleCommand("Name of StoredProcedure");
    spcmd.CommandType = CommandType.StoredProcedure;
    spcmd.Connection = con;
    spcmd.Parameters.Add("empid", OracleType.Number, 5).Value = txtEmpid.Text;
    spcmd.Parameters.Add("sal", OracleType.Number, 5).Value = txtSal.Text;
    spcmd.ExecuteNonQuery();
    }

  • Reading a flattened LabVIEW data string from a CSV file in C#?

    We're recording a large amount of data into a CSV file to make it easily accessible from the C# end. I've a header with all the variable names then I write all the data (doubles) as flattened LabVIEW binary strings using flatten to string (little endian) to keep the size down. We are having issues converting these strings back to doubles on the C# end.
    At the C# end we can read the LabVIEW repesentation of the DBL but have tried the BitConverter.ToDouble library function to convert it without luck. We use this method to convert the same flattened data coming over a TCP connection without any problems. I'm not writing the C# part of the program and have little experience with it, but if anyone could shed some light, it would be greatly appreciated.
    Regards,
    Andrew

    It is all written as single values. It looks like we have found a method if we remove the header which contains the variable name as a string so the data is in a csv containing just the binary data strings. It looks like we'll go with this as the data will always be written in the same order so can be indexed by the C# program without the need for headers.
    Thanks.

  • I am extracting the data from ECC To bw .but Data Loading taking long tim

    Hi All,
                     i am extracting the data from ECC To BI Syatem..but Data Loading Taking Long time. from last   6 hoursinfopackage is running.still it is showing yellow.Manually i made the red.and delete again i applied repeat of the last delta.but same proble is coming .in the status job is showing bckground job is not finished at source system.we requested to basis.basis people killed that job.again we schedule the chain also again same problem is coming.how can i solve this issue.
    Thanks ,
    chandu

    Hi,
    There are different places to track your job. Once your job is triggered in BW, you can track your load job where exactly it is taking more time and why. Follow below steps:
    1) After InfoPackage is triggered, then take the request number and go to source system to check your extraction job status.
    You can get the job status by taking the request number from BW and go to transaction SM37 in ECC. Then give the request number with begining '' and ending ''.  Also give '*' to user name.
    Job name:  REQ_XXXXXX
    User Name: *
    Check the job status whether job is completed or cancelled or short dump. If the job is still running check in SM66 whether you can see any process. If not accordingly you got to check in ST22 or SM21 in ECC. If the job is complete, then the same in BW side now.
    2) Check the data arrived in PSA, if not check whether Transfer routines or start routines are having bad SQL or code. Similarly in update rules.
    3) Once it is through in Source system (ECC), Transfer rules , Update Rules, then the next task is updating the data might some time take more time which might be based on some parameters ( Number of parallel process to update database ). Check whether updating the database is taking more time and may be you got to check with the DBA guy also.
    At all the times you should see minimum of atleast once process running all the time in SM66 till the time your job gets complete. If not you will see a log in ST22.
    Let me know if you still have questions.
    Assigning points is the only way of saying thanks in SDN.
    Thanks,
    Kumar.

  • ICal reports that it can't find server, and lots of data from several years ago is trying to get attention.  Cannot bring up calendar in any view to use. also keeps loading unused calendar websites from long ago.  I can' remove them. what to do?

    iCal reports that it can't find server, and lots of data from several years ago is trying to get attention.  Cannot bring up calendar in any view to use. also keeps loading unused calendar websites from long ago.  I can' remove them. what to do?

    UPDATE: I had 36 Safari windows open and minimized on the dock from my last session; 20 of those windows failed to open b/c Safari "couldn't find the server"; I just went to the URL bar of all 20 pages and clicked return, and all 20 pages loaded perfectly, without dropping any images or losing formatting. This is a puzzle!!!

  • How to export data from a string to a CSV file

    Hello,
    i do have a string in a Livecycle Designer script object with a couple of rows with different entries divided by a semicolon:
    COLUMN1;COLUMN2;COLUMN3
    Entry1;Entry2;Entry3
    Entry4;Entry5;Entry6
    The goal is now to export this string from Livecycle Designer into a CSV file by clicking a button. Is there any solution suggested?
    Thank you very much.

    Hi,
    You can try creating a dataObject and then exporting it, you might get some warning messages popup but try this;
    var csvData = "COLUMN1;COLUMN2;COLUMN3\r\n";
    csvData += "Entry1;Entry2;Entry3\r\n";
    csvData += "Entry4;Entry5;Entry6\r\n";
    var pdf = event.target;
    pdf.createDataObject("Data.csv", csvData);
    pdf.exportDataObject({cName: "Data.csv"});
    If you replace the last line with
    pdf.exportDataObject({cName: "Data.csv", nLaunch: 2});
    It will open in whatever .csv is registered for (Excel on my system)
    Regards
    Bruce

  • HT4890 i can no longer have pictures down loaded to my computer from my iphone

    i can no longer have pictures down loaded to my computer from my iphone it stoped 2 days ago

    Assuming you're using iTunes 11, when the iPhone is connected to iTunes it will show at the top right just next to the iTunes Store button. Also by pressing Ctrl+S to Show Sidebar you will find the device in the same place it was in iTunes 10

  • SQL*Loader - How to load only a few columns from a .csv file to ora table

    Hi there,
    Could anyone please let me know how to load few columns from a .csv
    file into a oracle table using SQL*Loader.
    I know how to create a .dat and .ctl file and run the sql loader.
    Suppose I have a .csv file with
    col1, col2, col3, col4
    and I only need to load col1 and col3 into col_a and col_b respectively
    in table_a?
    structure of table_ a
    col_a,
    col_b
    Please advice

    Try like..it i will work..
    LOAD DATA
    INFILE 'test.txt'
    LOAD DATA
    TRUNCATE INTO TABLE T1
    FIELDS TERMINATED BY ','
    (col1,
    col2 FILLER,
    col3,
    col4 FILLER
    )

  • ODI Error when Loading data from a .csv file to Planning

    Hello,
    I am trying to load data from a csv file to planning using ODI 10.1.3.6 and I am facing this particular error. I am using staging area as Sunopsis memory engine.
    7000 : null : java.sql.SQLException: Invalid COL ALIAS "DEFAULT C12_ALIAS__DEFAULT" for column "ALIAS:"
    java.sql.SQLException: Invalid COL ALIAS "DEFAULT C12_ALIAS__DEFAULT" for column "ALIAS:"
         at com.sunopsis.jdbc.driver.file.bb.b(bb.java)
         at com.sunopsis.jdbc.driver.file.bb.a(bb.java)
         at com.sunopsis.jdbc.driver.file.w.b(w.java)
         at com.sunopsis.jdbc.driver.file.w.executeQuery(w.java)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Code from Operator:
    select     Account     C1_ACCOUNT,
         Parent     C2_PARENT,
         Alias: Default     C12_ALIAS__DEFAULT,
         Data Storage     C3_DATA_STORAGE,
         Two Pass Calculation     C9_TWO_PASS_CALCULATION,
         Account Type     C6_ACCOUNT_TYPE,
         Time Balance     C14_TIME_BALANCE,
         Data Type     C5_DATA_TYPE,
         Variance Reporting     C10_VARIANCE_REPORTING,
         Source Plan Type     C13_SOURCE_PLAN_TYPE,
         Plan Type (FinStmt)     C7_PLAN_TYPE__FINSTMT_,
         Aggregation (FinStmt)     C8_AGGREGATION__FINSTMT_,
         Plan Type (WFP)     C15_PLAN_TYPE__WFP_,
         Aggregation (WFP)     C4_AGGREGATION__WFP_,
         Formula     C11_FORMULA
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=Account.csvSNP$CRLOAD_FILE=Y:/1 Metadata/Account//Account.csvSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=2CSNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=1SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=AccountSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=ParentSNP$CRTYPE_NAME=STRINGSNP$CRORDER=2SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Alias: DefaultSNP$CRTYPE_NAME=STRINGSNP$CRORDER=3SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Data StorageSNP$CRTYPE_NAME=STRINGSNP$CRORDER=4SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Two Pass CalculationSNP$CRTYPE_NAME=STRINGSNP$CRORDER=5SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Account TypeSNP$CRTYPE_NAME=STRINGSNP$CRORDER=6SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Time BalanceSNP$CRTYPE_NAME=STRINGSNP$CRORDER=7SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Data TypeSNP$CRTYPE_NAME=STRINGSNP$CRORDER=8SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Variance ReportingSNP$CRTYPE_NAME=STRINGSNP$CRORDER=9SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Source Plan TypeSNP$CRTYPE_NAME=STRINGSNP$CRORDER=10SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Plan Type (FinStmt)SNP$CRTYPE_NAME=STRINGSNP$CRORDER=11SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Aggregation (FinStmt)SNP$CRTYPE_NAME=STRINGSNP$CRORDER=12SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Plan Type (WFP)SNP$CRTYPE_NAME=STRINGSNP$CRORDER=13SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=Aggregation (WFP)SNP$CRTYPE_NAME=STRINGSNP$CRORDER=14SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=FormulaSNP$CRTYPE_NAME=STRINGSNP$CRORDER=15SNP$CRLENGTH=150SNP$CRPRECISION=150SNP$CR$$SNPS_END_KEY*/
    insert into "C$_0Account"
         C1_ACCOUNT,
         C2_PARENT,
         C12_ALIAS__DEFAULT,
         C3_DATA_STORAGE,
         C9_TWO_PASS_CALCULATION,
         C6_ACCOUNT_TYPE,
         C14_TIME_BALANCE,
         C5_DATA_TYPE,
         C10_VARIANCE_REPORTING,
         C13_SOURCE_PLAN_TYPE,
         C7_PLAN_TYPE__FINSTMT_,
         C8_AGGREGATION__FINSTMT_,
         C15_PLAN_TYPE__WFP_,
         C4_AGGREGATION__WFP_,
         C11_FORMULA
    values
         :C1_ACCOUNT,
         :C2_PARENT,
         :C12_ALIAS__DEFAULT,
         :C3_DATA_STORAGE,
         :C9_TWO_PASS_CALCULATION,
         :C6_ACCOUNT_TYPE,
         :C14_TIME_BALANCE,
         :C5_DATA_TYPE,
         :C10_VARIANCE_REPORTING,
         :C13_SOURCE_PLAN_TYPE,
         :C7_PLAN_TYPE__FINSTMT_,
         :C8_AGGREGATION__FINSTMT_,
         :C15_PLAN_TYPE__WFP_,
         :C4_AGGREGATION__WFP_,
         :C11_FORMULA
    Thanks in advance!

    Right-clicking "data" on the model tab can you see the data?
    In your code there's written:
    P$CRLOAD_FILE=Y:/1 Metadata/Account//Account.csv
    Is it right the double slash before the file name?

  • Need help in loading data from a csv file to a table in Oracle DB

    Hi,
    I am using sqlplus as a client to connect to the server.
    I am trying to load data from a csv file from a client to a table in Oracle DB server.
    I am trying to use the below command
    " LOAD DATA INFILE 'test.csv' INTO TABLE testTable FIELDS TERMINATED BY ',' (test1,test2,testc3,testc4); "
    But, I am encountered with the following error
    "SP2-0042: unknown command "load data" - rest of line ignored."
    Thanks in advance.
    SB

    Hey Frostmann,
    That was a nice post....
    I changed my mind to use an 'Insert into' statement from a shell script.
    I created a DB table named test and I tried using the below shell script to insert a row in the table.
    sqlplus test/test@test <<ENDOFSQL
    INSERT INTO test VALUES('test1',123,'test2','test3');
    exit
    ENDOFSQL
    A row is succesfully inserted into the table when I run the script manually, but it does not insert rows when a cron job is scheduled.
    Could you please help me with this?
    Thanks in advance.
    SB

  • System only loading the first column from csv

    Trying to load data from Excel saved as csv, but the preview and PSA shows data loaded only for the first column from the csv file. All other columns are not loaded from the csv. Changed the lengths of the fields from the datasource to match the ones in the csv to 8, but it only seems to load the first column. What could be the cause?

    Hi
    Check the file format once and general tab in Data source(make sour you selected comma separated file and symbol)
    check below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/01ed2fe3811a77e10000000a422035/frameset.htm
    Regards,
    Venkatesh

  • I have to generate a 4 char unique string from a long value

    I got a requirment
    I have to generate a 4 char unique string from a long value
    Eeach char can be any of 32 character defined has below.
    private static final char char_map[] = new char[]{'7','2','6','9','5','3','4','8','X','M','G','D','A','E','B','F','C','Q','J','Y','H','U','W','V','S','K','R','L','N','P','Z','T'};
    So for 4 char string the possible combination can be 32 * 32 * 32 * 32 = 1048576
    If any one passes a long value between 0 - 1048576 , it should generate a unique 4 char string.
    Any one with idea will be a great help.

    Well, a long is 64 bits. A char is 16 bits. Once you determine how you want to map the long's bits to your char bits, go google for "java bitwise operators".

  • I can no longer sync.  I get the "iTunes was unable to load data class information from Sync Services. Reconnect or try again later."  Trying again gets same error.

    I can no longer sync.  I get the "iTunes was unable to load data class information from Sync Services. Reconnect or try again later."  Trying again gets same error.  Thoughts?

    See:
    iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert
    "load data class"

  • AES256 bit encyption key from 64 character long string

    Hi,
    I have Oracle 10.2 on Windows 2003. I have recently started working on a project that requires encrypting information before sending it over. I have got 64 character long string to use it as a key.
    I am getting ORA-06502: PL/SQL: numeric or value error: raw variable length too long
    <pre>
    declare
    input_string VARCHAR2 (200) := 'SomeText';
    output_string VARCHAR2 (200);
    encrypted_raw RAW (2000); -- stores encrypted binary text
    decrypted_raw RAW (2000); -- stores decrypted binary text
    key_bytes_raw RAW (32); -- stores 256-bit encryption key
    encryption_type PLS_INTEGER; -- total encryption type
    begin
    DBMS_OUTPUT.PUT_LINE ('Original string: ' || input_string);
    encryption_type := DBMS_CRYPTO.ENCRYPT_AES256 + DBMS_CRYPTO.CHAIN_CBC + DBMS_CRYPTO.PAD_PKCS5;
    key_bytes_raw := UTL_I18N.STRING_TO_RAW('eiccmkjd94jfgniw03ljkdlfutcnv3209kfjd67023jlclmxzlmc9543ykflseu6', 'AL32UTF8');
    encrypted_raw := DBMS_CRYPTO.ENCRYPT
    src => UTL_I18N.STRING_TO_RAW (input_string, 'AL32UTF8'),
    typ => encryption_type,
    key => key_bytes_raw
    -- The encrypted value in the encrypted_raw variable can be used here
    decrypted_raw := DBMS_CRYPTO.DECRYPT
    src => encrypted_raw,
    typ => encryption_type,
    key => key_bytes_raw
    output_string := UTL_I18N.RAW_TO_CHAR (decrypted_raw, 'AL32UTF8');
    DBMS_OUTPUT.PUT_LINE ('Decrypted string: ' || output_string);
    end;
    Please let me know hot to convert 64 character long string in to 256bit key.
    Thanks
    -Smith

    smith_apex wrote:
    My client is using Java and they are saying that they are using this key for their AES256 Encryption and working fine. I have asked them to provide me 32 bytes key as in Oracle 256bit is 32 character string.
    Let me see what they have to say.
    I was wondering why Java has 64 bytes for 256 AES encryption when Oracle need only 32 bytes for same encryption.I am not sure I completely understand how those built-in packages work but the doc example produces the raw key that is same in length (in terms of number of characters) as the one you are using.
    Yet your UTL_I18N packaged function fails for your key but works for the documentation example.
    Documentation example:
    SQL> select * from v$version ;
    BANNER
    Oracle Database 10g Release 10.2.0.5.0 - Production
    PL/SQL Release 10.2.0.5.0 - Production
    CORE     10.2.0.5.0     Production
    TNS for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    declare
       input_string       VARCHAR2 (200) := 'Secret Message';
       output_string      VARCHAR2 (200);
       encrypted_raw      RAW (2000);             -- stores encrypted binary text
       decrypted_raw      RAW (2000);             -- stores decrypted binary text
       num_key_bytes      NUMBER := 256/8;        -- key length 256 bits (32 bytes)
       key_bytes_raw      RAW (32);               -- stores 256-bit encryption key
       encryption_type    PLS_INTEGER :=          -- total encryption type
                                DBMS_CRYPTO.ENCRYPT_AES256
                              + DBMS_CRYPTO.CHAIN_CBC
                              + DBMS_CRYPTO.PAD_PKCS5;
    begin
       DBMS_OUTPUT.PUT_LINE ('Original string: ' || input_string);
       DBMS_OUTPUT.PUT_LINE ('Encryption Type: ' || encryption_type);
       key_bytes_raw := DBMS_CRYPTO.RANDOMBYTES (num_key_bytes);
       DBMS_OUTPUT.PUT_LINE ('Key Bytes(RAW): ' || key_bytes_raw);
       encrypted_raw := DBMS_CRYPTO.ENCRYPT
             src => UTL_I18N.STRING_TO_RAW (input_string, 'AL32UTF8'),
             typ => encryption_type,
             key => key_bytes_raw
       DBMS_OUTPUT.PUT_LINE ('Encrypted string: ' || encrypted_raw);
        -- The encrypted value in the encrypted_raw variable can be used here
       decrypted_raw := DBMS_CRYPTO.DECRYPT
             src => encrypted_raw,
             typ => encryption_type,
             key => key_bytes_raw
       output_string := UTL_I18N.RAW_TO_CHAR (decrypted_raw, 'AL32UTF8');
       DBMS_OUTPUT.PUT_LINE ('Decrypted string: ' || output_string);
    end;
    32   33   34  /
    Original string: Secret Message
    Encryption Type: 4360
    Key Bytes(RAW): 52EC66508FDF1E5DE5FD38EC2467FAA91009B738A2926AA870E142C080C72EBF
    Encrypted string: 0BDDC2B94F7044700D85624297A39025
    Decrypted string: Secret Message
    PL/SQL procedure successfully completed.
    SQL> select length('52EC66508FDF1E5DE5FD38EC2467FAA91009B738A2926AA870E142C080C72EBF') from dual ;
    LENGTH('52EC66508FDF1E5DE5FD38EC2467FAA91009B738A2926AA870E142C080C72EBF')
                                                 64
    SQL> select dump('52EC66508FDF1E5DE5FD38EC2467FAA91009B738A2926AA870E142C080C72EBF') from dual ;
    DUMP('52EC66508FDF1E5DE5FD38EC2467FAA91009B738A2926AA870E142C080C72EBF')
    Typ=96 Len=64: 53,50,69,67,54,54,53,48,56,70,68,70,49,69,53,68,69,53,70,68,51,56,69,67,50,52,54,55,70,65,65,57,49,48,48,57,66,55,51,56,65,50,57,50,54,65,65,56,55,48,69,49,
    52,50,67,48,56,48,67,55,50,69,66,70Your example:
    declare
       input_string       VARCHAR2 (200) := 'SomeText';
       output_string      VARCHAR2 (200);
       encrypted_raw      RAW (2000);             -- stores encrypted binary text
       decrypted_raw      RAW (2000);             -- stores decrypted binary text
       key_bytes_raw      RAW (32);               -- stores 256-bit encryption key
       encryption_type    PLS_INTEGER;          -- total encryption type
    begin
       DBMS_OUTPUT.PUT_LINE ('Original string: ' || input_string);
       encryption_type :=   DBMS_CRYPTO.ENCRYPT_AES256 + DBMS_CRYPTO.CHAIN_CBC + DBMS_CRYPTO.PAD_PKCS5;
       key_bytes_raw := UTL_I18N.STRING_TO_RAW('eiccmkjd94jfgniw03ljkdlfutcnv3209kfjd67023jlclmxzlmc9543ykflseu6', 'AL32UTF8');
       DBMS_OUTPUT.PUT_LINE ('Key Bytes(RAW): ' || key_bytes_raw);
       encrypted_raw := DBMS_CRYPTO.ENCRYPT
             src => UTL_I18N.STRING_TO_RAW (input_string, 'AL32UTF8'),
             typ => encryption_type,
             key => key_bytes_raw
        -- The encrypted value in the encrypted_raw variable can be used here
       decrypted_raw := DBMS_CRYPTO.DECRYPT
             src => encrypted_raw,
             typ => encryption_type,
             key => key_bytes_raw
       output_string := UTL_I18N.RAW_TO_CHAR (decrypted_raw, 'AL32UTF8');
       DBMS_OUTPUT.PUT_LINE ('Decrypted string: ' || output_string);
    end;
    27   28   29   30  /
    Original string: SomeText
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: raw variable length too long
    ORA-06512: at line 12
    SQL> select length('eiccmkjd94jfgniw03ljkdlfutcnv3209kfjd67023jlclmxzlmc9543ykflseu6') from dual ;
    LENGTH('EICCMKJD94JFGNIW03LJKDLFUTCNV3209KFJD67023JLCLMXZLMC9543YKFLSEU6')
                                                 64
    SQL> select dump('eiccmkjd94jfgniw03ljkdlfutcnv3209kfjd67023jlclmxzlmc9543ykflseu6') from dual ;
    DUMP('EICCMKJD94JFGNIW03LJKDLFUTCNV3209KFJD67023JLCLMXZLMC9543YKFLSEU6')
    Typ=96 Len=64: 101,105,99,99,109,107,106,100,57,52,106,102,103,110,105,119,48,51,108,106,107,100,108,102,117,116,99,110,118,51,50,48,57,107,102,106,100,54,55,48,50,51,106,
    108,99,108,109,120,122,108,109,99,57,53,52,51,121,107,102,108,115,101,117,54

  • Extract multiple data from long string

    I am working in Crystal Reports XI looking at an SQL database. How can I pick up several different data bits from a realy long string? Each element I want is preceded by "Old Value =" or "New Value =". The problem is that there are up to 4 different sets of these "Old Value =", "New Value =" so I can only get the first set if I use "InStr" to find "Old Value =" or "New Value =".
    Since they are preceded by unique headings like "RuntimeMinutes", I thought I could use "InStr" to find that "RuntimeMinutes" or whichever and then use that value as the location number nested in another "InStr" to find "New Value =" and nest it all in a "Mid" expression. But however I did it I got an error highlighting that "InStr" nested in "InStr" saying it was not an integer or the value was less than 1.
    Any ideas?

    The way that I'd deal with this is by creating formula fields for each value that you want to extract.  In the sample below, I'm assuming your string looks something like this:
    RuntimeMinutes OldValue=123 NewValue=234 DbReads OldValue=12345 NewValue=34567
    The formula for {@Runtime Minutes Old Value} would then look like (basic syntax):
    dim pos as number
    ' Find where RuntimeMunutes old and new values start:
    pos = InStr({really long string}, "RuntimeMinutes")
    ' Find first OldValue after RuntimeMinutes:
    pos = InStr(pos + 14, {really long string}, "OldValue")  ' 14 = Len("RuntimeMinutes")
    ' Pull out the value:
    formula = val(mid({really long string}, pos + 9,
                        Instr(pos + 9, {really long string}, " ") - pos - 9)) ' 9=Len("OldValue=")
    And do the same for all of the other values you need. 
    HTH,
    Carl

Maybe you are looking for

  • Hp laserjet 4m printer, the greatest printer in the world vs 10.5

    I have an old HP laserjet 4m printer. This is the best investment I ever made for my business. It has been a great workhorse, always reliable. Now with Leopard it does not work. The print driver sees the printer and allows about 2 seconds of connecti

  • Terminating the instance due to error 119

    System : Oracle 11gR2 running on Oracle VM. Issue : Oracle fails to comeup after LISTENER.ORA is removed/corrupted. Any reason? Actions taken : used *.ora files from backup taken during healthy state and dbstart works fine now. Resolved but Question

  • Java FX + Request + Applet

    Hello, I develop a simple Chat that sends the Chat Msg to a server and write it into a database. After that the read the 10 newest messages and response these as string... In Netbeans it works greatly (Standard Exceution).. but If I change it to "Run

  • CSS not loading when application is packaged.

    I'm having an odd issue that I can't resolve. I'm developing a simple air application using javascript (jquery framework), CSS and html. It all works fine while I build and debug it but when I package the application it doesn't seem to load the CSS f

  • Slow boot up in safe mode?

    Why does my MacBook Pro (13-inch, Early 2011) boot up UNBELIEVABLY slow in safe mode? I've been using safe mode to delete glitchy software (non Apple certified) that I installed, but it just takes FOREVER to boot the computer. Why is this the case? A