Still the same problem. I'm wondering if the tables have to match structure?

Shawn.


On 1/18/2011 1:06 PM, Richard Pascual wrote:
If you are using the "id" column as a key managed by a before-insert trigger, try excluding the column from your insert statement altogether. If you insert a record into a table and do not reference a column, the implied value is null. Explicitly inserting a null may be what is causing you the problem. This may help.

Rich Pascual


On Tue, Jan 18, 2011 at 12:00 PM, Shawn Hall <shawnrh...@gmail.com <mailto:shawnrh...@gmail.com>> wrote:

    I'll try that but the reason I pass NULL is there is a before
    insert trigger to kick off a sequence  value for the surrogate key.

    Shawn



    On 1/18/2011 11:20 AM, Praveen Namdeo wrote:
    Hi Shawn,

    After looking your query, the error because of NULL value. You
    remove the NULL and try. this should work.

    Thanks,
    Praveen Namdeo
    Emirates Group IT

    On Tue, Jan 18, 2011 at 10:00 AM, Shawn Hall
    <shawnrh...@gmail.com <mailto:shawnrh...@gmail.com>> wrote:

        Good morning,

        I was hoping someone might have another set of eyes on this
        as to why its not working or have an idea as to what I'm
        doing wrong.

        SQL> desc rgnc_metric_value

        Name                                      Null?    Type

        ----------------------------------------- --------
        ----------------------------

        METRIC_VALUE_ID                           NOT NULL NUMBER(38)

        METRIC_ID                                          NUMBER

        METRIC_VALUE                                       VARCHAR2(2000)

        METRIC_NAME                                        VARCHAR2(64)

        UNIT                                               VARCHAR2(100)

        BEGIN_TIME                                         DATE

        END_TIME                                           DATE

        MINVAL                                             NUMBER

        MAXVAL                                             NUMBER

        AVERAGE                                            NUMBER

        STANDARD_DEVIATION                                 NUMBER

        DB_ID                                              NUMBER

        SQL> desc target_metric_temp

        Name                                      Null?    Type

        ----------------------------------------- --------
        ----------------------------

        METRIC_ID                                 NOT NULL NUMBER

        METRIC_NAME                               NOT NULL VARCHAR2(192)

        METRIC_UNIT                               NOT NULL VARCHAR2(192)

        BEGIN_TIME                                NOT NULL DATE

        END_TIME                                  NOT NULL DATE

        MINVAL                                    NOT NULL NUMBER

        MAXVAL                                    NOT NULL NUMBER

        AVERAGE                                   NOT NULL NUMBER

        STANDARD_DEVIATION                        NOT NULL NUMBER

        DB_ID                                              CHAR(3)

        SQL>

        SQL> MERGE INTO rgnc_metric_value x

        USING target_metric_temp y

          2    3  ON (x.metric_id = y.metric_id)

          4  WHEN NOT MATCHED THEN

          5   insert (metric_value_id, metric_id, metric_name, unit,
        begin_time, end_time, minval, maxval, average,
        standard_deviation, db_id)

          6   values (NULL, y.metric_id, y.metric_name, y.unit,
        y.begin_time, y.end_time, y.minval, y.maxval, y.average,
        y.standard_deviation, y.db_id);

        values (NULL, y.metric_id, y.metric_name, y.unit,
        y.begin_time, y.end_time, y.minval, y.maxval, y.average,
        y.standard_deviation, y.db_id)

                                                   *

        ERROR at line 6:

        ORA-06553: PLS-306: wrong number or types of arguments in
        call to 'OGC_Y'



-- You received this message because you are subscribed to the
        Google
        Groups "Oracle PL/SQL" group.
        To post to this group, send email to
        Oracle-PLSQL@googlegroups.com
        <mailto:Oracle-PLSQL@googlegroups.com>
        To unsubscribe from this group, send email to
        oracle-plsql-unsubscr...@googlegroups.com
        <mailto:oracle-plsql-unsubscr...@googlegroups.com>
        For more options, visit this group at
        http://groups.google.com/group/Oracle-PLSQL?hl=en


-- You received this message because you are subscribed to the Google
    Groups "Oracle PL/SQL" group.
    To post to this group, send email to
    Oracle-PLSQL@googlegroups.com <mailto:Oracle-PLSQL@googlegroups.com>
    To unsubscribe from this group, send email to
    oracle-plsql-unsubscr...@googlegroups.com
    <mailto:oracle-plsql-unsubscr...@googlegroups.com>
    For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

-- You received this message because you are subscribed to the Google
    Groups "Oracle PL/SQL" group.
    To post to this group, send email to Oracle-PLSQL@googlegroups.com
    <mailto:Oracle-PLSQL@googlegroups.com>
    To unsubscribe from this group, send email to
    oracle-plsql-unsubscr...@googlegroups.com
    <mailto:oracle-plsql-unsubscr...@googlegroups.com>
    For more options, visit this group at
    http://groups.google.com/group/Oracle-PLSQL?hl=en


--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to