Reports 6i to 10g Migration (Value Does Not Match mask 'MM/DD/YYYY'

Dear all,
I am Migrating Oracle 6i Reports to 10g. I am just compiling the 6i Reports in 10g Reports Builder and giving the
Report for Deployment after it got successfully ran in the report builder.
In one of the Report Report Query i am checking date range like below
WHERE lov_dte BETWEEN :L_FRM_DTE AND :L_TO_DTE
L_FRM_DTE and L_TO_DTE input mask is MM/DD/YYYY
i got the output in report builder and as well as from the application also but after the compiled the same report
in 10g and tested in server ..
i am getting the following error in server ..
REP-546:Value does not match mask 'MM/DD/YYYY'
ORA-01030:Date format picture ends before converting entire input string
REP-0091:Invalid value for parameter L_FRM_DTE
any body faced the same problem ...please help me to resolve this issue ..
I Tried Changing the Query to
WHERE lov_dte BETWEEN to_date(:L_FRM_DTE,'mm/dd/yyyy') AND to_date(:L_TO_DTE,'mm/dd/yyyy')
but still no use because iam getting runtime error ORA-01858 NON NUMERIC CHARACTER WAS FOUND WHERE A NUMERICA CHAR WAS EXPECTED.
Thank you all for Looking into my problem..
Data Boy

Dear all i found the document related to this problem in META LINK ..The Bug no is 5597464
The base of this Bug is 4589885
It is given that
Fixed in Product Version 11.0
but when i go to oracle site ..i cant find this version for Developer suite. can anyone please help in this
there is only Oracle Developer Suite 10g (10.1.2.0.2).
Thank you all for looking into my problem.

Similar Messages

  • [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]

    Hii ..
    need help on this ..
    This what I am doing ..
    I am using a DATAEXPORT function to export level0 data from my essbase 11.1.2.2 to Microsoft SQL 2008 tables.
    So what I did first I exported the level0 data to a flat file using DATAEXPORT and the created the SQL columns by the same  in that order only in my SQL table.
    When I run it fails with this error:
    ODBC Layer Error: [21S01] ==> [[DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Column name or number of supplied values does not match table definition.]
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021014)
    ODBC Layer Error: Native Error code [213]
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Error(1012085)
    Unable to export data to SQL table [dataexp]. Check the Essbase server log and the system console to determine the cause of the problem.
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1021002)
    SQL Connection is Freed
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Warning(1080014)
    Transaction [ 0x1c50001( 0x51ee7d66.0x80342 ) ] aborted due to status [1012085].
    [Tue Jul 23 18:26:07 2013]Local/dataexp/dataexp/admin@Native Directory/1209813312/Info(1012579)
    Total Calc Elapsed Time for [test.csc] : [1.44] seconds
    =============================================================
    I did a simple test on my Sample.basic application then ..
    loaded the calc data to it and then used the below script to export to a flat file
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    SET DATAEXPORTOPTIONS
                    DataExportLevel "Level0";
                    DataExportOverwriteFile ON;
                    DataExportColFormat OFF;
                    DataExportDimHeader OFF;
    FIX(
                "Jan",
                "Sales",
                "Actual"
    /*DATAEXPORT "File" "," "/home/hypadmin/samtest.txt";*/
    DATAEXPORT "DSN" "Abhitest" "sample" "sa" "welcome1";
    ENDFIX
    out put as below:
    "Sales"
    "100-30","California"
    "Jan","Actual",145
    Now In sql I created only 3 columns with name Jan/Sales/Actual and when I run this script again with comments removed .. I get the same error as what I have got in my first test case with other application ..
    but when I create the columns with same name as what its in export
    Sales/100-30/Califirnia/Jan/Actual
    It created the new rows successfully ..
    So with this I think the error which I am getting with my other application might be because of the same column issue  .. but then I have created all the columns by looking at the export file only as I did in sample ..
    Any idea would be helpful ..
    Thanks
    Abhishek
    I

    First make sure you add
    DataExportRelationalFile ON;
    to your set commands it is missing
    I alwats like to also add
    DataExportColHeader dimensionName;
    so I am sure what dimension is getting put into the columns.
    Then count the number of dimensions in your outline (exclude attribute dimensions). You need at least that many columns in your table  -1 + the number of  members you will be returning as columns in the export
    Taking your example Sample basic has 5 dimensions
    Measures
    Years
    Scenario
    Product
    Market
    Since you did not specify a dataexportcolheader it took the dense dimension Scenario as the columns. Your fix statement is limiting that to one member. Doing the math
    5 -1 + 1 = 5 columns in your table which is what you found works.  Suppose you fixed on bothe Actual and budget in scenario then you would need 6 columns 5 -1 +2

  • Data type of the base attribute or the base value does not match...

    ...the assigned expression.
    Hello all,
    I always get the Error
    +<ERROR+
    TEXT="'DWH.CUB_REGISTRATIONS_AW.REGISTRATIONS': XOQ-02517: Der Datentyp des Basisattributs oder der Basisgröße stimmt nicht mit dem zugeordneten Ausdruck überein.
    XOQ-01400: Ungültige Metadatenobjekte"/>
    The English message must be something like this:
    The data type of the base attribute or the base value does not match the assigned expression.
    when I run my mapping. The attribute REGISTRATIONS is NUMERIC (12,2) in the Cube and I map a NUMERIC(12,2) constant in it.
    I use a simple OWB-Mapping for loading, but I don't understand why it doesn't function. Other mappings where the attributes are out of a
    table I put in a cube are running well.
    I tried different things, but nothing fixed my problem. Any idea ?
    Thanks a lot for help
    Michael

    Technically this is a 'warning' from the server, not an 'error'. This means that the change you made should have been submitted, but you get an warning message on the client. AWM would suppress this warning, but evidently OWB does not. Can you switch to use AWM?
    Here is the definition of the warning along with 'cause' and 'action' sections. (Unfortunately these sections are not translated into German for some reason.)
    >
    02517, 0, "The data type \"%(1)s\" of the base attribute or base measure is different from the mapped expression \"%(2)s\"."
    // *Cause: Either the base attribute or base measure with the mapped expression was set to an inconsistent data type, or it was mapped to an expression of a different data type from its fixed data type.
    // *Action: When changing a mapped expression for a base attribute or base measure, ensure that the expression has the same data type; otherwise, set the data type of the base attribute or base measure to NULL first. When a base attribute or a base measure has an existing mapped expression, do not set it to a different data type.
    >
    It is probably safe to ignore this warning, but if you can post the relevant XML for the cube, then will probably be able to spot the problem. I assume that REGISTRATIONS is a measure in the cube CUB_REGISTRATIONS_AW, so this is what you can look for in the XML:
    (1) The definition of the base measure along with the datatype. It should be something like this
    <Measure>
      <BaseMeasure
        SQLDataType="NUMBER(12,2)"
        ETMeasureColumnName="REGISTRATIONS"
        Name="REGISTRATIONS">(2) The mapping info for the measure, which should looks something like this:
    <MeasureMap
      Name="REGISTRATIONS"
      Expression="...">
      <Measure Name="REGISTRATIONS"/>
    </MeasureMap>I don't know if you can get the XML directly from OWB. If not, then DBMS_CUBE.EXPORT_XML should work (assuming you are in 11.2). You could also attach AWM and save the cube to an XML template.

  • Error the entered value does not match the specified field type

    Hi,
    When I try to insert a null value to a field of the User Defined Table I am getting the error "The entered value does not match the specified field type" in SAP Business One version 2007 PL 42.
    Any help would be appreciated.
    Thanks in advance.
    Sudha.

    Hi Sudha,
    It probably have to do with how you defined the field.
    Is Null value allowed?
    What are the field definitions?
    Thanks,
    Jesper

  • DI: Stock Transfer error (Unique field value does not match the system ...)

    Hi
    I made an add-on that makes stock transfers via DI API. The add-on has been running for two months with more than 10,000 stock transfers with almost no problems.
    The company that is using the add-on have all their products managed by serial/batch numbers.
    But just with one transfer Im getting the error in the stock transfer Add() method:
    "Unique field value does not match the system serial number [(----)29-52]"
    And I tried to debug it without success, I checked that the system serial numbers exists in the origin warehouse and are available. And I really can't find where is the problem.
    If somebody knows what this error means, please let me know.
    Thanks in advance,
    Regards,
    Allan

    Hi János, thanks for your answer.
    I found what was the problem, it was not exactly what you told me, but you gave me some insights to found the problem.
    The thing is that Im using UDT's to store the information of stock transfers (before creating a real SAP stock transfer), because of the funcionality of the add-on. After some user have done some steps or validations, the add-on actually does the real SAP stock transfer.
    The problem here was that my tables had some InternalSerial for some Item, for example the serial A-234, and before the real SAP stock transfer was made, they changed the serial from A-234 to A234 (in the serial number management). So the add-on was trying to create the transfer with the serial A-234, but the serial A-234 no longer exists.
    I have to create a validation that if they change the serial number for an item, I have to change it in my UDT's.
    On the other hand, Im not sure, but I think that I read before that you made a Warehouse Management add-on. This add-on that Im working now is a kind of warehouse management.
    Im having a lot of headaches because the poor accessibility to the user fields in the OSRI and OIBT tables. Im sure that you have faced problems with this. If you have any tips or advices about this it would be greatly appreciated.
    Thanks again,
    Regards
    Allan

  • Row Insert Failed - Column name or number of supplied values does not match

    Hi ,
    I am trying add a new field to an existing table in MSSQL and access it in portlets,
    I added the new field in the table, and making necessary updations to the accessing java code seems to look fine. but when i insert the new rwo, fails with exception listed below.
    My code tidbits is as follows.
                   System.out.println("Column Location of outsidePhysician"+ aResultSet.findColumn("outsidePhysician")); // works and returns 24
                   if (anIntake.getOutsidePhysician() != null && !(anIntake.getOutsidePhysician().equals("")))
                        System.out.println("Now Alternate Physician will be added to resultset");
                        aResultSet.updateString(24, anIntake.getOutsidePhysician());
                        aResultSet.updateString("outsidePhysician",anIntake.getOutsidePhysician());
                        System.out.println("Now Alternate Physician already added to resultset"); // also printed
                   }else{
                        aResultSet.updateString(24, "new Physician");
                        aResultSet.updateString("outsidePhysician","new Physician");
                   //NOT NULL
                   aResultSet.insertRow(); // fails here
                   System.out.println("Inserted");
    The table has the right field name too, which is proved when i retrieve the fieldno, based on field name. I tried to delete the field and removing these changes work ok..
    Any ideas would be of help
    Thanks in Advance
    Usha
    [Microsoft][SQLServer 2000 Driver for JDBC]Row insert failed. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseImplUpdatableResultSet.executeStatement(Unknown Source) at com.microsoft.jdbc.base.BaseImplUpdatableResultSet.insertRow(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.insertRow(Unknown Source) at com.microsoft.jdbcx.base.BaseResultSetWrapper.insertRow(Unknown Source) at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.insertRow(WSJdbcResultSet.java:2181) ... 14 more Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Insert Error: Column name or number of supplied values does not match table definition. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExce

    I haven't ever used that method of inserting rows, but from the example in the API documentation it looks to me like you have to callaResultSet.moveToInsertRow();before you callaResultSet.insertRow();Or are you just "inserting" the physician's name into existing rows of the database? If that's what you are doing then you need to callaResultSet.updateRow();Message was edited by:
    DrClap

  • Column name or number of supplied values does not match table definition

    Buongiorno a tutti,
    sto cercando di inserire dei record in un database SQL, usando l'oggetto DB tools Insert data. Purtroppo però mi viene segnalato il seguente errore:
    "Exception occured in Microsoft OLE DB Provider for SQL Server: Column name or number of supplied values does not match table definition. in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlibB Tools Insert Data.vi"
    Il recod viene generato da Labivew usando l'oggetto concatanate string e i campi sono separati da tab. se esporto su Excel sembra tutto corretto e non ho errori. Le colonne del mio database corrispondono a quelle del record e sono tutte varchar. Vi allego la porzione di codice che genera il record.
    Suggerimenti?
    Grazie,
    Davide
    Allegati:
    db.png ‏5 KB

    Per qualche strano motivo l'editor ha convertuito la sequenza di caratteri ":" e  "D" in uno smile

  • Inventory in warehouse report value does not match balance sheet account

    Dear experts,
    When I run the inventory in warehouse report, the value (using last purchase price) does not match the inventory finished goods account. Can you please advise why?
    Thank you for any advice.
    Jane

    Dear Jane,
    The only report for inventory to link to financial statement would be Inventory Audit Report.
    All other reports are just for your convenience. They are not financial based.
    Thanks,
    Gordon

  • Datetime value does not match the specified format

    Hi All,
    I am writing this function for a template
    case when "Employment Events (Current)"."Most Recent Hire Date" is NULL then NULL else CAST(TIMESTAMPDIFF(SQL_TSI_YEAR,cast(cast("Employment Events (Current)"."Most Recent Hire Date" as char)as timestamp),Cast(Cast(@{EndDate}{CAST('2011-01-01' AS DATE)} AS CHAR) AS TIMESTAMP)) AS CHAR)||' year(s) ' end
    but when it runs, it throws me this error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46046] Datetime value 2011-01-01 does not match the specified format. (HY000)
    What am I doing wrong? "Employment Events (Current)"."Most Recent Hire Date" is set to max - aggregation in the rpd.

    I found the solution as well.
    The ODBC driver on the Windows server was old (Version 6). I upgraded that to SQL Server Native Client 11.0 and everything works fine.

  • DBMS_CRYPTO MD5 hash value does not match 3rd party MD5 free tool

    Hello,
    I am using Oracle Version: 11.2.4.
    I have a problem where the MD5 value from DBMS_CRYPTO does not match the hash value from 3rd party MD5 free tool (MD5 Checksum Calculator 0.0.5.58 or WinMD5Free v1.20) and also the MD5 hash value calculated by an ingestion tool where I am transferring files to. The MD5 hash value that the ingestion tool calculates is the same as the 3rd party MD5 free tools I have. This occurs only on some of the XML files that I generate using XSQL(xmlserialize, xmlagg, xmlelement, etc.) and DBMS_XSLPROCESSOR on a Linux OS. The XML files are transferred from the Unix OS to my Windows 7 OS via filezilla.
    I found a thread on this forum that also had a similar issue so I copy/paste the java functions. They are listed below(both are the same expect for the character set):
    create or replace java source named "MD5_UTF_8" as
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.sql.Clob;
    import java.sql.Blob;
    public class MD5_UTF_8 {
    private static final byte [] hexDigit = {
    '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
    /** Converts a byte array to a hex string
    * Returns an empty string if the byte array is null
    public static final String toHexString(byte [] bytes) {
    if (bytes == null) return new String("");
    StringBuffer buf = new StringBuffer(bytes.length * 2);
    for (int i = 0; i < bytes.length; i++) {
    buf.append((char) hexDigit[((bytes >>> 4) & 0x0F)]);
    buf.append((char) hexDigit[(bytes & 0x0F)]);
    return buf.toString();
    // Convert Hex String to Byte Array
    public static final byte[] byteArrayFromHexString(String str) {
    byte[] bytes = new byte[str.length() / 2];
    for (int i = 0; i < bytes.length; i++)
    bytes = (byte) Integer.parseInt(str.substring(2 * i, 2 * i + 2), 16);
    return bytes;
    public static String getMD5HashFromClob(Clob inhalt) throws Exception{
    MessageDigest algorithm;
    StringBuffer hexString;
    String s = null;
    String salida = null;
    int i;
    byte[] digest;
    String tepFordigest = inhalt.getSubString(1L, (int)inhalt.length());
    try {
    algorithm = MessageDigest.getInstance("MD5_UTF_8");
    algorithm.reset();
    algorithm.update(tepFordigest.getBytes("UTF-8"));
    digest = algorithm.digest();
    s = toHexString(digest);
    } catch (java.security.NoSuchAlgorithmException nsae) {
    s = "No es posible cifrar MD5";
    return s;
    sho err
    alter java source "MD5_UTF_8" compile
    sho err
    CREATE OR REPLACE FUNCTION get_md5_UTF_8_CLOB(inhalt CLOB) RETURN VARCHAR2 DETERMINISTIC
    AS LANGUAGE JAVA
    name 'MD5_UTF_8.getMD5HashFromClob(java.sql.Clob) return java.lang.String';
    create or replace java source named "MD5" as
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.sql.Clob;
    import java.sql.Blob;
    public class MD5 {
    private static final byte [] hexDigit = {
    '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
    /** Converts a byte array to a hex string
    * Returns an empty string if the byte array is null
    public static final String toHexString(byte [] bytes) {
    if (bytes == null) return new String("");
    StringBuffer buf = new StringBuffer(bytes.length * 2);
    for (int i = 0; i < bytes.length; i++) {
    buf.append((char) hexDigit[((bytes >>> 4) & 0x0F)]);
    buf.append((char) hexDigit[(bytes & 0x0F)]);
    return buf.toString();
    // Convert Hex String to Byte Array
    public static final byte[] byteArrayFromHexString(String str) {
    byte[] bytes = new byte[str.length() / 2];
    for (int i = 0; i < bytes.length; i++)
    bytes = (byte) Integer.parseInt(str.substring(2 * i, 2 * i + 2), 16);
    return bytes;
    public static String getMD5HashFromClob(Clob inhalt) throws Exception{
    MessageDigest algorithm;
    StringBuffer hexString;
    String s = null;
    String salida = null;
    int i;
    byte[] digest;
    String tepFordigest = inhalt.getSubString(1L, (int)inhalt.length());
    try {
    algorithm = MessageDigest.getInstance("MD5");
    algorithm.reset();
    algorithm.update(tepFordigest.getBytes());
    digest = algorithm.digest();
    s = toHexString(digest);
    } catch (java.security.NoSuchAlgorithmException nsae) {
    s = "No es posible cifrar MD5";
    return s;
    sho err
    alter java source "MD5" compile
    sho err
    CREATE OR REPLACE FUNCTION get_md5_CLOB(inhalt CLOB) RETURN VARCHAR2 DETERMINISTIC
    AS LANGUAGE JAVA
    name 'MD5.getMD5HashFromClob(java.sql.Clob) return java.lang.String';
    I created the above java functions and added the calls to them in my package to see what hash values they would produce but I am getting "ORA-29532: Java call terminated by uncaught Java exception: java.nio.BufferOverflowException " the XML is about 60mb.
    package code sniippets:
    declare
    l_hash raw(2000);
    l_checksum_md5 varchar2(2000);
    l_checksum_md5_utf_8 varchar2(2000);
    Begin
    t_checksum := lower(RAWTOHEX(dbms_crypto.hash(src=>l_clob,typ=>dbms_crypto.hash_md5)));
    l_hash := get_md5_CLOB (l_clob);
    l_checksum_md5 := lower(rawtohex(l_hash));
    l_hash := get_md5_UTF_8_CLOB (l_clob);
    l_checksum_md5_UTF_8 := lower(rawtohex(l_hash));Please help,
    Thank You in advance
    Don
    Edited by: 972551 on Nov 21, 2012 12:18 PM
    Edited by: sabre150 on Nov 21, 2012 11:06 PM
    Moderator action : added [code ] tags to format properly. In future please add them yourself.

    >
    I have a problem where the MD5 value from DBMS_CRYPTO does not match the hash value from 3rd party MD5 free tool (MD5 Checksum Calculator 0.0.5.58 or WinMD5Free v1.20) and also the MD5 hash value calculated by an ingestion tool where I am transferring files to. The MD5 hash value that the ingestion tool calculates is the same as the 3rd party MD5 free tools I have.
    I found a thread on this forum that also had a similar issue so I copy/paste the java functions.
    >
    And in that thread (Re: MD5 HASH computed from DBMS_CRYPTO does not match .NET MD5 I provided the reason why DBMS_CRYPTO may not match hashes produced by other methodologies.
    I have no idea why you copied and posted all of that Java code the other poster and I provided since code has NOTHING to do with the problem you say you are having. Thte other poster's question was how to write Java code that would produce the same result as DBMS_CRYPTO.
    You said your problem was understanding why DBMS_CRYPTO 'does not match the hash value from 3rd party MD5 free tool ...'. and I answered that in the other forum.
    >
    The Crypto package always converts everything to AL32UTF8 before hashing so if the .NET character set is different the hash will likely be different.
    See DBMS_CRYPTO in the PL/SQL Packages and Types doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_crypto.htm
    If you look at the spec header for the DBMS_CRYPTO package it shows this note:
    -- Prior to encryption, hashing or keyed hashing, CLOB datatype is
    -- converted to AL32UTF8. This allows cryptographic data to be
    -- transferred and understood between databases with different
    -- character sets, across character set changes and between
    -- separate processes (for example, Java programs).
    -- If your 3rd party MD5 free tool (MD5 Checksum Calculator 0.0.5.58 or WinMD5Free v1.20) do not use the AL32UTF8 character set then the hashes will likely be different. You can't modify DBMS_CRYPTO so if the hashes need to match you need to use 3rd party tools that either use the correct character set or can be configured to use the correct character set.
    The problem in the other thread was how to WRITE Java code that uses the correct character set and I showed that OP how to do that.
    So unless you are writing your own Java code all of that code you copied and pasted is useless for your use case.

  • DBMS_CRYTPO MD5 value does NOT match 3rd party MD5 tools

    Hello,
    I am using Oracle Version: 11.2.4.
    I have a problem where the MD5 value from DBMS_CRYPTO does not match the hash value from 3rd party MD5 free tool (MD5 Checksum Calculator 0.0.5.58 or WinMD5Free v1.20) and also the MD5 hash value calculated by an ingestion tool where I am transferring files to. The MD5 hash value that the ingestion tool calculates is the same as the 3rd party MD5 free tools I have. This occurs only on some of the XML files that I generate using XSQL(xmlserialize, xmlagg, xmlelement, etc.) and DBMS_XSLPROCESSOR on a Linux OS. The XML files are transferred from the Unix OS to my Windows 7 OS via filezilla.
    I found a thread on this forum that also had a similar issue so I copy/paste the java functions. They are listed below(both are the same expect for the character set):
    create or replace java source named "MD5_UTF_8" as
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.sql.Clob;
    import java.sql.Blob;
    public class MD5_UTF_8 {
    private static final byte [] hexDigit = {
         '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
    /** Converts a byte array to a hex string
    * Returns an empty string if the byte array is null
    public static final String toHexString(byte [] bytes) {
    if (bytes == null) return new String("");
    StringBuffer buf = new StringBuffer(bytes.length * 2);
    for (int i = 0; i < bytes.length; i++) {
    buf.append((char) hexDigit[((bytes[i] >>> 4) & 0x0F)]);
    buf.append((char) hexDigit[(bytes[i] & 0x0F)]);
    return buf.toString();
    // Convert Hex String to Byte Array
    public static final byte[] byteArrayFromHexString(String str) {
    byte[] bytes = new byte[str.length() / 2];
    for (int i = 0; i < bytes.length; i++)
    bytes[i] = (byte) Integer.parseInt(str.substring(2 * i, 2 * i + 2), 16);
    return bytes;
    public static String getMD5HashFromClob(Clob inhalt) throws Exception{
    MessageDigest algorithm;
    StringBuffer hexString;
    String s = null;
    String salida = null;
    int i;
    byte[] digest;
    String tepFordigest = inhalt.getSubString(1L, (int)inhalt.length());
    try {
    algorithm = MessageDigest.getInstance("MD5_UTF_8");
    algorithm.reset();
    algorithm.update(tepFordigest.getBytes("UTF-8"));
    digest = algorithm.digest();
    s = toHexString(digest);
    } catch (java.security.NoSuchAlgorithmException nsae) {
    s = "No es posible cifrar MD5";
    return s;
    sho err
    alter java source "MD5_UTF_8" compile
    sho err
    CREATE OR REPLACE FUNCTION get_md5_UTF_8_CLOB(inhalt CLOB) RETURN VARCHAR2 DETERMINISTIC
    AS LANGUAGE JAVA
    name 'MD5_UTF_8.getMD5HashFromClob(java.sql.Clob) return java.lang.String';
    create or replace java source named "MD5" as
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.sql.Clob;
    import java.sql.Blob;
    public class MD5 {
    private static final byte [] hexDigit = {
         '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
    /** Converts a byte array to a hex string
    * Returns an empty string if the byte array is null
    public static final String toHexString(byte [] bytes) {
    if (bytes == null) return new String("");
    StringBuffer buf = new StringBuffer(bytes.length * 2);
    for (int i = 0; i < bytes.length; i++) {
    buf.append((char) hexDigit[((bytes[i] >>> 4) & 0x0F)]);
    buf.append((char) hexDigit[(bytes[i] & 0x0F)]);
    return buf.toString();
    // Convert Hex String to Byte Array
    public static final byte[] byteArrayFromHexString(String str) {
    byte[] bytes = new byte[str.length() / 2];
    for (int i = 0; i < bytes.length; i++)
    bytes[i] = (byte) Integer.parseInt(str.substring(2 * i, 2 * i + 2), 16);
    return bytes;
    public static String getMD5HashFromClob(Clob inhalt) throws Exception{
    MessageDigest algorithm;
    StringBuffer hexString;
    String s = null;
    String salida = null;
    int i;
    byte[] digest;
    String tepFordigest = inhalt.getSubString(1L, (int)inhalt.length());
    try {
    algorithm = MessageDigest.getInstance("MD5");
    algorithm.reset();
    algorithm.update(tepFordigest.getBytes());
    digest = algorithm.digest();
    s = toHexString(digest);
    } catch (java.security.NoSuchAlgorithmException nsae) {
    s = "No es posible cifrar MD5";
    return s;
    sho err
    alter java source "MD5" compile
    sho err
    CREATE OR REPLACE FUNCTION get_md5_CLOB(inhalt CLOB) RETURN VARCHAR2 DETERMINISTIC
    AS LANGUAGE JAVA
    name 'MD5.getMD5HashFromClob(java.sql.Clob) return java.lang.String';
    I created the above java functions and added the calls to them in my package to see what hash values they would produce but I am getting "ORA-29532: Java call terminated by uncaught Java exception: java.nio.BufferOverflowException " the XML is about 60mb.
    package code sniippets:
    declare
    l_hash raw(2000);
    l_checksum_md5 varchar2(2000);
    l_checksum_md5_utf_8 varchar2(2000);
    Begin
    t_checksum := lower(RAWTOHEX(dbms_crypto.hash(src=>l_clob,typ=>dbms_crypto.hash_md5)));
    l_hash := get_md5_CLOB (l_clob);
    l_checksum_md5 := lower(rawtohex(l_hash));
    l_hash := get_md5_UTF_8_CLOB (l_clob);
    l_checksum_md5_UTF_8 := lower(rawtohex(l_hash));
    Please help,
    Thank You in advance
    Don
    Edited by: 972551 on Nov 21, 2012 12:45 PM

    Thanks for the reply but my syntax is correct.
    t_checksum := lower(RAWTOHEX(dbms_crypto.hash(src=>l_clob,typ=>dbms_crypto.hash_md5)));
    The typ argument tells dbms_crypto what type of hash value to produce.
    This is from the Oracle Docs:
    Table 24-3 DBMS_CRYPTO Cryptographic Hash Functions
    Name      Description
    HASH_MD4 Produces a 128-bit hash, or message digest of the input message
    HASH_MD5 Also produces a 128-bit hash, but is more complex than MD4
    HASH_SH1 Secure Hash Algorithm (SHA). Produces a 160-bit hash.
    for further details see: http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_crypto.htm#i1002022
    Edited by: 972551 on Nov 21, 2012 12:46 PM

  • TRIGGERS TOPIC I AM GETTING ERROR AS Msg 213, Level 16, State 1, Procedure tr_employee1_insert, Line 6 Column name or number of supplied values does not match table definition.

    /*FIRST TABLE*/
    create table Employee1(
    empid int,
    empname varchar(20),
    salary int,
    gender varchar(10),
    depid int)
    insert into Employee1 values(1,'jitendra',500000,'m',100)
    /*2 ND TABLE*/
    create table audit(
    empid int,
    auditdata varchar(50)) 
     NOW I AM APPLYING TRIGGER
     /* triggers demo for after insert*/
     alter trigger tr_employee1_insert
     on  Employee1 for insert
     as begin
     declare @id int
     select @id=empid from inserted
     insert into audit values ('new employee is inserted with id=' + CAST(@id as nvarchar(5))+'is added at'+CAST(GETDATE() as nvarchar(20)))
     end
     insert into employee1 values (9,'shubham',110000,'m',200)
    PLEASE HELP ME TO SOLVE

     declare @id int
     select @id=empid from inserted
     insert into audit values ('new employee is inserted with id=' + CAST(@id as nvarchar(5))+'is added at'+CAST(GETDATE() as nvarchar(20)))
    This code will not properly handle a multi-row insert.  I suggest an approach like the example below instead of scalar variables.  Also, I suggest you just store the normalized data in the audit table (id, action, timestamp) instead of the
    formatted string.  That will facilitate subsequent queries and reporting on the data.
    ALTER TRIGGER tr_employee1_insert
    ON dbo.Employee1 FOR INSERT
    AS
    INSERT INTO dbo.audit (empid, auditdata)
    SELECT
    id
    , 'new employee is inserted with id=' + CAST(id as nvarchar(5)) + 'is added at ' + CAST(GETDATE() as nvarchar(20))
    FROM inserted;
    GO
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Insert Error: Column name or number of supplied values does not match table definition.

    I'm getting this error when I try to run my stored procedure, I have checked that the inserts matches the select, which seemed to be
    the issue for most of the time this question is asked. As far as I can tell they match so something else must be wrong.
    Code:-
    CREATE proc [dbo].[prc_ITEM_master_Customer]
    as 
    begin 
    set nocount on
    /****** Object:  Table [dbo].[tempdb..tmpWebCustomers]    Script Date: 03/05/2014 20:49:28 ******/
    IF  EXISTS (SELECT * FROM tempdb.sys.objects WHERE name = 'tmpWebCustomers' AND type in (N'U'))
    DROP TABLE tempdb..tmpWebCustomers
    CREATE TABLE tempdb..tmpWebCustomers
    [Customer Number] varchar(6),
    [Store Number] varchar(6),
    [Company Name] varchar(35),
    [Email Address] varchar(75),
    [Password] varchar(20),
    [Contact Name] varchar(20),
    [Phone] varchar(20),
    [Billing Address] varchar(40),
    [Billing City] varchar(30),
    [Billing State] varchar(2),
    [Billing Zip] varchar(10),
    [Billing Country] varchar(15),
    [Shipping Address] varchar(40),
    [Shipping City] varchar(30),
    [Shipping State] varchar(2),
    [Shipping Zip] varchar(10),
    [Shipping Country] varchar(15),
    [Payment Terms] varchar(1),
    [Prepaid Freight Amount] decimal(14,4),
    [Is Preferred] bit,
    [Fuel Surcharge Exempt] bit,
    [Sales Tax Addback] bit,
    [Broken Box Exempt] bit,
    [Canada Freight Exempt] bit,
    [Furniture Handling Exempt] bit,
    [Create At] datetime,
    [Updated At] datetime,
    [Sales Rep] varchar(50),
    [Sales Rep Phone] varchar(15),
    [Sales Rep Email] varchar(50),
    [Inside Rep] varchar(50),
    [Inside Rep Email] varchar(50),
    [Parent] bit
    --Insert All Non-National Account Customers--
    INSERT INTO tempdb..tmpWebCustomers
    SELECT
    C.CUSTNO as 'Customer Number',
    '' as 'Store Number',
    C.COMPANY as 'Company Name',
    RTRIM(C.EMAIL) as 'Email Address',
    C.MISC6 as 'Password',
    C.CONTACT as 'Contact Name',
    C.PHONE as 'Phone',
    C.ADDRESS1 as 'Billing Address',
    C.CITY as 'Billing City',
    C.STATE as 'Billing State',
    C.ZIP as 'Billing Zip',
    C.COUNTRY as 'Billing Country',
    '' as  'Shipping Address',
    '' as 'Shipping City',
    '' as 'Shipping State',
    '' as 'Shipping Zip',
    '' as 'Shipping Country',
    CASE
    WHEN C.PTERMS='CREDIT CARD' THEN 1
    WHEN C.PTERMS='CREDIT CART ONLY' THEN 1
    WHEN C.PNET=0 THEN 0
    ELSE 2
    END as 'Payment Terms',
    C.PPFREIGHT as 'Prepaid Freight Amount',
    C.PRPRICE as 'Is Preferred',
    C.FSEXEMPT as 'Fuel Surcharge Exempt',
    C.STADDBACK as 'Sales Tax Addback',
    C.BROKEN as 'Boken Box Exempt',
    C.CANADAFREIGHT as 'Canada Freight Exempt',
    C.FHEXEMPT as 'Furniture Handling Exempt',
    C.ADDDATE as 'Created At',
    C.LCKDATE as 'Updated At',
    RTRIM(R.SFIRST) +' '+ RTRIM(R.SLAST) as 'Sales Rep',
    R.PHONE as 'Sales Rep Phone',
    CASE
    WHEN R.EMAIL='[email protected]' then ''
    ELSE R.EMAIL
    END as 'Sales Rep Email',
    RTRIM(I.SFIRST) +' '+ RTRIM(I.SLAST) as 'Inside Rep',
    I.EMAIL as 'Inside Rep Email',
    0
    FROM tblARCUST C 
    INNER JOIN tblICSLSP R ON C.SALESMN=R.SLSMN
    LEFT OUTER JOIN tblICSLSP I ON R.INSIDESALES=I.SLSMN
    WHERE 
    C.NATION=0
    AND C.ACTIVE=1
    AND C.MISC6 !=''
    AND C.EMAIL like '%@%'
    --Populate Shipping Address Data--
    UPDATE tempdb..tmpWebCustomers
    SET 
    [Shipping Address]=RTRIM(S.ADDRESS1),
    [Shipping City]=RTRIM(S.CITY),
    [Shipping State]=RTRIM(S.STATE),
    [Shipping Zip]=RTRIM(S.ZIP),
    [Shipping Country]=RTRIM(S.COUNTRY)
    from tempdb..tmpWebCustomers W
    INNER JOIN tblARCADR S ON W.[Customer Number]=S.CUSTNO
    WHERE S.DEFASHIP='Y'
    UPDATE tempdb..tmpWebCustomers
    SET
    [Shipping Address]=[Billing Address],
    [Shipping City]=[Billing City],
    [Shipping State]=[Billing State],
    [Shipping Zip]=[Billing Zip],
    [Shipping Country]=[Billing Country]
    WHERE
    [Shipping Address]=''
    --Insert National Account Customers
    INSERT INTO tempdb..tmpWebCustomers
    SELECT
    C.CUSTNO as 'Customer Number',
    S.CSHIPNO as 'Store Number',
    S.COMPANY as 'Company Name',
    RTRIM(S.EMAIL) as 'Email Address',
    S.MISC6 as 'Password',
    S.CONTACT as 'Contact Name',
    S.PHONE as 'Phone',
    C.ADDRESS1 as 'Billing Address',
    C.CITY as 'Billing City',
    C.STATE as 'Billing State',
    C.ZIP as 'Billing Zip',
    C.COUNTRY as 'Billing Country',
    S.ADDRESS1 as  'Shipping Address',
    S.CITY as 'Shipping City',
    S.STATE as 'Shipping State',
    S.ZIP as 'Shipping Zip',
    S.COUNTRY as 'Shipping Country',
    CASE
    WHEN C.PTERMS='CREDIT CARD' THEN 1
    WHEN C.PTERMS='CREDIT CART ONLY' THEN 1
    WHEN C.PNET=0 THEN 0
    ELSE 2
    END as 'Payment Terms',
    C.PPFREIGHT as 'Prepaid Freight Amount',
    C.PRPRICE as 'Is Preferred',
    C.FSEXEMPT as 'Fuel Surcharge Exempt',
    C.STADDBACK as 'Sales Tax Addback',
    C.BROKEN as 'Boken Box Exempt',
    C.CANADAFREIGHT as 'Canada Freight Exempt',
    C.FHEXEMPT as 'Furniture Handling Exempt',
    S.ADDDATE as 'Created At',
    S.LCKDATE as 'Updated At',
    RTRIM(R.SFIRST) +' '+ RTRIM(R.SLAST) as 'Sales Rep',
    R.PHONE as 'Sales Rep Phone',
    CASE
    WHEN R.EMAIL='[email protected]' then ''
    ELSE R.EMAIL
    END as 'Sales Rep Email',
    RTRIM(I.SFIRST) +' '+ RTRIM(I.SLAST) as 'Inside Rep',
    I.EMAIL as 'Inside Rep Email',
    0
    FROM tblARCUST C
    INNER JOIN tblARCADR S ON C.CUSTNO=S.CUSTNO 
    INNER JOIN tblICSLSP R ON C.SALESMN=R.SLSMN
    LEFT OUTER JOIN tblICSLSP I ON R.INSIDESALES=I.SLSMN
    WHERE 
    C.NATION=1
    AND C.ACTIVE=1
    AND S.MISC6 !=''
    AND S.EMAIL LIKE '%@%'
    --Insert National Account Parents
    INSERT INTO tempdb..tmpWebCustomers
    SELECT
    C.CUSTNO as 'Customer Number',
    '' as 'Store Number',
    C.COMPANY as 'Company Name',
    RTRIM(C.EMAIL) as 'Email Address',
    C.MISC6 as 'Password',
    C.CONTACT as 'Contact Name',
    C.PHONE as 'Phone',
    C.ADDRESS1 as 'Billing Address',
    C.CITY as 'Billing City',
    C.STATE as 'Billing State',
    C.ZIP as 'Billing Zip',
    C.COUNTRY as 'Billing Country',
    C.ADDRESS1 as  'Shipping Address',
    C.CITY as 'Shipping City',
    C.STATE as 'Shipping State',
    C.ZIP as 'Shipping Zip',
    C.COUNTRY as 'Shipping Country',
    CASE
    WHEN C.PTERMS='CREDIT CARD' THEN 1
    WHEN C.PTERMS='CREDIT CART ONLY' THEN 1
    WHEN C.PNET=0 THEN 0
    ELSE 2
    END as 'Payment Terms',
    C.PPFREIGHT as 'Prepaid Freight Amount',
    C.PRPRICE as 'Is Preferred',
    C.FSEXEMPT as 'Fuel Surcharge Exempt',
    C.STADDBACK as 'Sales Tax Addback',
    C.BROKEN as 'Boken Box Exempt',
    C.CANADAFREIGHT as 'Canada Freight Exempt',
    C.FHEXEMPT as 'Furniture Handling Exempt',
    C.ADDDATE as 'Created At',
    C.LCKDATE as 'Updated At',
    RTRIM(R.SFIRST) +' '+ RTRIM(R.SLAST) as 'Sales Rep',
    R.PHONE as 'Sales Rep Phone',
    CASE
    WHEN R.EMAIL='[email protected]' then ''
    ELSE R.EMAIL
    END as 'Sales Rep Email',
    RTRIM(I.SFIRST) +' '+ RTRIM(I.SLAST) as 'Inside Rep',
    I.EMAIL as 'Inside Rep Email',
    1
    FROM tblARCUST C 
    INNER JOIN tblICSLSP R ON C.SALESMN=R.SLSMN
    LEFT OUTER JOIN tblICSLSP I ON R.INSIDESALES=I.SLSMN
    WHERE 
    C.NATION=1
    AND C.ACTIVE=1
    AND C.MISC6 !=''
    AND C.EMAIL like '%@%'
    end
    GO

    Cant spot anything obvious
    Are you sure you're running this in a new window? Make sure there's not any other bits of code present in window where you're running this.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How can join two tables if column values does not match

    Hi guys,
    i have table
    col1 col2
    abcd 123
    asdf 234
    wert 456
    sedf 789
    and another table with
    col1
    abcd
    aaaa
    but i need the output like
    abcd 123
    abcd 234
    abcd 456
    abcd 789
    aaaa 123
    aaaa 234
    aaaa 456
    aaaa 789

    You do not tell us about this where condition before, but...
    select b.col1, a.col2  from table a, another_table b
    where a.col2 in (123, 234, 456, 789)or
    select b.col1, a.col2  from table a, another_table b
    where a.col1 in ('abcd','asdf','wert','sedf' )

  • Trace value does not match what is really happening

    I am trying to detect the bandwidth using my flash player.
    I followed the instructions you gave here: http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d5 6e-7ffa.html#WS5b3ccc516d4fbf351e63e3d11a0773d117-7ffb and all goes smoothly.
    BUT I want to take the bandwidth, given in the output of Flash CS4 and use it within javascript.
    Here is the major problem. I have tried to  dispatch an Event when a valid BW is given (the first value is always NaN).
    But when I use this in my webpage - I always get a value of 0. Which is crazy and completely different to what I get when I output using using within CS4.
    My code for Client.as is below. Please help!
    Client.as:
    package CIS.FLVPlayer
        import flash.events.*;
        import flash.external.ExternalInterface;
        import CIS.Utils.ExternalTrace;
        public class Client extends EventDispatcher{
          public static var bandwidth_event:String = "bandwidth_event";
         private var p_bw:Number;
          public function onBWCheck(... rest):Number
                return 0;
        public function onBWDone(... rest):Number
             var bw_event:Event = new Event(Client.bandwidth_event);
                if (rest[0] > 0)
                    ExternalTrace.alert(rest[0]);
                    p_bw = rest[0];
                    ExternalTrace.alert("rest:" + rest + "\np_bw: " + p_bw);
                    trace("rest:" + rest + "\np_bw: " + p_bw);
                    this.dispatchEvent(bw_event);
                    return p_bw;
                  else
                    ExternalTrace.alert("p_bw: " + p_bw);
                    trace("p_bw: " + p_bw);
                    return p_bw;

    Try using the "classic" PrintToPDF @ http://www.jwwalker.com/pages/pdf.html
    This way you will be creating a PDF file using classic instead of OS X's Print To PDF.
     Cheers, Tom

Maybe you are looking for