Insert Into with subquery less 00947. 00000 - not enough of"values."

I'm writing an insert using LESS but can't seem to get the syntax right or it will even work?

I use less because it is more accurate with the data in the table.

INSERT INTO PROVIDER_TESTS (PROVIDER_TESTS_ID, PROVIDER_ID, ALL_CODE_ID, ORDINAL, GENERIC_DESCRIPTION, FASTING_HOURS, EMERGENCY, ABN_INDICATOR, PROCEDURE_ID, COMPENDIUM_ID)
VALUES (SEQ_PROVIDER_TESTS_ID. NEXTVAL, 2395350,)
(SELECT ALL_CODE_ID, ORDINAL, GENERIC_DESCRIPTION, FASTING_HOURS, EMERGENCY, ABN_INDICATOR, PROCEDURE_ID, COMPENDIUM_ID
OF PROVIDER_TESTS WHERE PROVIDER_ID = 921
LESS
SELECT ALL_CODE_ID, ORDINAL, GENERIC_DESCRIPTION, FASTING_HOURS, EMERGENCY, ABN_INDICATOR, PROCEDURE_ID, COMPENDIUM_ID
OF PROVIDER_TESTS WHERE PROVIDER_ID = 2395350));

Thank you

This is because the values clause only supports scalar subquery expressions. This means that the query may return only as a column and a row. You should be able to restructure your query like this:

INSERT INTO PROVIDER_TESTS
( PROVIDER_TESTS_ID
, PROVIDER_ID
, ALL_CODE_ID
, ORDINAL
, GENERIC_DESCRIPTION
, FASTING_HOURS
, URGENCY
, ABN_INDICATOR
, PROCEDURE_ID
, COMPENDIUM_ID
)
SELECT SEQ_PROVIDER_TESTS_ID.NEXTVAL
     , 2395350
     , a.*
FROM
(
     SELECT ALL_CODE_ID
          , ORDINAL
          , GENERIC_DESCRIPTION
          , FASTING_HOURS
          , URGENCY
          , ABN_INDICATOR
          , PROCEDURE_ID
          , COMPENDIUM_ID
     FROM PROVIDER_TESTS
     WHERE PROVIDER_ID =921
     MINUS
     SELECT ALL_CODE_ID
          , ORDINAL
          , GENERIC_DESCRIPTION
          , FASTING_HOURS
          , URGENCY
          , ABN_INDICATOR
          , PROCEDURE_ID
          , COMPENDIUM_ID
     FROM   PROVIDER_TESTS
     WHERE PROVIDER_ID = 2395350
) a;

Tags: Database

Similar Questions

  • How do I update my laptop so he sees my micro sd card, I inserted into my laptop, but it did not come

    How I update my laptop so he sees my micro sd card, I inserted into my laptop, but it didn't come up.

    help much appreciated.

    Hello

    Thank you for visiting Microsoft Community.

    According to the description, I understand that the problem with you want to update the laptop so that it can recognize the micro SD card in the computer.

    Of course, I understand the inconvenience and will try my best to help you.

    In order to understand the issue more clearly, please provide me the following information.

    1. What exactly happens when you insert the micro SD card in the laptop?
    2. Do you receive an error message? If Yes, what is the exact error message and the error code?
    3. What is the brand and model of the laptop?
    4. How you try to connect the SD card? Is inserting into the card reader on your computer or you are using an external card reader?
    5. You see an error message or the exclamation point in Device Manager when you connect the SD card?

    I suggest you follow the steps how to check for the exclamation point in Device Manager.

    1. Click on Start and go to Run.
    2. In the prompt to run it, type devmgmt.msc , and then click OK.
    3. Device Manager opens.
    4. In Device Manager, double-click the device category.
    5. Check the yellow exclamation point against each category.

    It is possible that this problem would have occurred if the chipset drivers are not updated in the system.

    I would suggest trying the following methods and check if it helps.

    Method 1:

    I suggest you to update the Chipset drivers on the manufacturer's Web site and check if it helps.

    If the problem persists, please follow method 2.

    Method 2:

    Try to run the built-in troubleshooting utility and check if it works.

    Open the hardware and devices Troubleshooter, please follow the steps in the link provided below.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

    Note: If your computer is having problems with a recently installed device or other hardware, try to use the hardware and peripheral troubleshooting tool to solve the problem. It checks the common issues of interest and ensures that a new device or hardware connected to your computer has been installed correctly.

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • INSERT INTO with SELECT CASE

    Hi all
    I have this problem: Insert Table_A Table_B values... with a derivatives/calculated filed.
    Example of
    INSERT INTO Table_A (id_part, vendtype, origin, proven, desc)
    SELECT id_p, vendt, origin, proven, <calculate/derivated_field_desc>
    FROM Table_B
    The rules for calculating the desc field inserted on Table_A are
    1. IF vendt='V' AND origin='N' AND proven!='04' THEN ---> desc='TRANSFER'
    2. IF vendt='M' AND origin='N' AND proven!='04' THEN ---> desc='IMPORTED'
    3. IF proven='04' THEN ---> desc='BAD'
    So what I use on my INSERT INTO statement < calculate/derivated_field_desc >?
    Can I use a SELECT BOX WHEN block... or only DECODE is a good solution?

    Published by: November 15, 2010 12.51 trebbia

    Two things I noticed: 1. you should remove the "SELECT" before the CASE and 2. There is an incompatibility of single quotation mark (').

  • Button with URL redirection sends do not all the values of the checkbox

    Hello
    I have a page/form with a checkbox element. Multiple values can be selected.

    When you view the page, there is a button that when clicked, has an optional redirection defined. The value stored in the checkbox element has been specified to go to the new page.

    When the button is pressed, only the first selected value appears on the new page. The two values appear to be sent in the URL
    The segment of the url by passing this value has two points separating the values.
    ...,Value%20A:value % 20 b...

    How do you manage values multiple items in the option redirect 'place these items' & 'with these elements' definition

    You can't spend colons in the value of the element within the f? p URL. If the checkbox element is already in session state in a list of values separated by a colon, then you don't need to pass it in the URL. The target page can reference it by name.

    Scott

  • Built dynamically Insert Into does not

    It's curious me lot. There must be the syntax, it's almost always with my code. I am dynamically building a query of insertion. The Insert Into clause works. The clause Values does not work. Instead of translating and passing the actual values, the system is in the way the character clause. I've built a dynamic where clauses and Order By clauses several times. Here again, the Insert Into clause seems to work, just not the values clause. Why?

    Quote:
    Posted by: indnajns
    There is a whole page in front of anyone looking for invalid dates, the values null, etc. etc. I won't to double check to see if the Sun rose this morning, I let the computer do what it is supposed to.

    I tried to put a tag in there evaluate. But I obviously did not do right, since it still does not work. As I said, my syntax is usually the problem.

    I thought it would be nice to have the computer create the sql, rather than manually code. It is but a part of the page. The page is actually discount vars form which should be divided between three separate tables. I was under the impression that we have computers to do boring stuff for us. If I manually have to do everything well, that defeated the purpose of 'simple maintenance' type and all that jazz that I'm always heard. Yes, I can code this manually, I have several pages where I do it, but I thought because it gets to be cut on three tables, it would be the right time to automate things.

    So, back to the original question, where I would put the tag evaluate?

    You do not have.

    So far, the best answer is Jochem. But, if you don't want to do this way, when you build your input strings, the values of the variables instead of the variable names.

  • Cannot insert data with the PDO function [from: insert and update of the server in the same shape behaviors]

    I feel as if I'm fighting my way around a paper bag trying to insert a record.  I have recently converted from MySQL for PDP, which cannot be applied.  I'm not trying to write routines to update data and started with insert.  I tried the example in your PHP Solutions edition two, pp. 361-363, but I can't get a written account.

    It is a database, which I supported since the host server using phpMyAdmin.  I'm very well display the data on the site, so I guess that my login script is ok.  However, nothing I've tried has got a registered insert.  I tried to get back to the basics, and it still does not work.  This is my current code.  Something is wrong with my statement = $sql and I can't identify the problem.  Help, please!

    If (isset($_POST['insert'])) {}

    try {}

    create the SQL

    $sql = "INSERT INTO Homepage_text (enriched, h_date, h_seq, h_col, p_heading, p_text, h_hide) VALUES ($_POST ['enriched'], $_POST ['h_date'], $_POST ['h_seq'], $_POST ['h_col'], $_POST ['p_heading'], $_POST ['p_text'], $_POST ['h_hide']);"

    $sainttim-> execute ($sql);

    echo "new record successfully created ';

    }

    catch (PDOException ($e) exception

    {

    echo $sql. "< br / > '. $e-> getMessage();

    }

    }

    There are several things wrong with your code:

    • You use elements of an associative array within a double quoted string. Which will cause a parse error.
    • The values you are trying to insert in the database are for most (if not all) of the text fields. If you use a literal SQL query, text fields must be wrapped in quotes.
    • You try to use the method execute() with a literal SQL query. In AOP, execute() only works with a prepared statement. To run a literal SQL query, you must use the exec() method.
    • Passing the values in the array $_POST directly in the database without any sort of validation and without escaping quotes or other characters just asking for trouble.

    Follow the examples in the book, and use a prepared statement. To address all these issues quickly and easily.

  • ORA-00947 not enough values, why?

    In this code, why do I get "ORA-00947 not enough of values, it has the same number of columns, just a select statement."

    Help, please.
    type list_employee_type is table of employee_tmp%rowtype;
    
     procedure search_by_jobId (jobId IN varchar2,  list_employee_rtn OUT list_employee_type,
            success OUT boolean, exception_msg OUT varchar2)
            is        
         begin    
           select * into list_employee_rtn from employee_tmp where job_id = jobId ;       
        end search_by_jobId;

    >
    still do not understand, can you please give me more details?
    >
    SQL does NOT include PL/SQL types. This is a PL/SQL type:

    type list_employee_type is table of employee_tmp%rowtype;
    

    You can use in SQL:

    select * into list_employee_rtn from employee_tmp where job_id = jobId 
    

    You must use a SQL type

    And the full exception you was probably one like this:
    >
    ORA-06550: line 7, column 22:
    PLS-00642: types of local collections not allowed in SQL queries
    ORA-06550: line 7, column 40:
    PL/SQL: ORA-00947: not enough values
    ORA-06550: line 7, column 8:
    PL/SQL: SQL statement ignored
    >
    PLS-00642 is the exception that said you that you used the wrong type.

    Here are the types SQL based on the SCOTT. EMP table

    -- type to match emp record
    create or replace type emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
      )
      /
    
    -- table of emp records
    create or replace type emp_table_type as table of emp_scalar_type
      /
    

    Now you can use "emp_table_type" in a PL/SQL procedure, and in the select statement.

  • Get 'not enough values error' in bulk collect

    I want to insert all the rows in the employees table in the tmp table which has the structure.

    Purpose: Try just feature fired block to create a return to the top of a table.

    Problem: My code is to not "enough of values" error please report if mistaken.

    structure of the employees table:

    SQL > desc employee;

    Name                                      Null?    Type

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

    EMPLOYEE_ID NOT NULL NUMBER (6)

    FIRST NAME VARCHAR2 (20)

    LAST_NAME NOT NULL VARCHAR2 (25)

    EMAIL NOT NULL VARCHAR2 (25)

    PHONE_NUMBER VARCHAR2 (20)

    HIRE_DATE NOT NULL DATE

    JOB_ID NOT NULL VARCHAR2 (10)

    SALARY NUMBER (8.2)

    COMMISSION_PCT NUMBER (2.2)

    MANAGER_ID NUMBER (6)

    DEPARTMENT_ID NUMBER 4

    tmp table structure:

    SQL > tmp desc;

    Name                                      Null?    Type

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

    EMPLOYE_ID NUMBER (6)

    FIRST NAME VARCHAR2 (20)

    LAST_NAME NOT NULL VARCHAR2 (25)

    EMAIL NOT NULL VARCHAR2 (25)

    PHONE_NUMBER VARCHAR2 (20)

    HIRE_DATE NOT NULL DATE

    JOB_ID NOT NULL VARCHAR2 (10)

    SALARY NUMBER (8.2)

    COMMISSION_PCT NUMBER (2.2)

    MANAGER_ID NUMBER (6)

    DEPARTMENT_ID NUMBER 4

    SQL > select * from tmp;

    no selected line

    Code:

    declare

    type rec is the employee table % rowtype

    index by pls_integer;

    a rec;

    Start

    Select * bulk collect in a

    employees;

    ForAll i in a.first... a.Last

    Insert into tmp values (a (i));

    end;

    /

    Result:

    SQL > declare

    2

    3 type rec is the employee table % rowtype

    4 index of pls_integer;

    5 a rec;

    6

    7. start

    8 remove tmp;

    9 select * bulk collect in a

    10 employees;

    11 ForAll i in a.first... a.Last

    12 insert into tmp values (a (i));

    13 end;

    14.

    Insert into tmp values (a (i));

    *

    ERROR on line 12:

    ORA-06550: line 12, column 13:

    PL/SQL: ORA-00947: not enough values

    ORA-06550: line 12, column 1:

    PL/SQL: SQL statement ignored

    Remove parentheses

    insert into tmp values a(i);
    

    or call the individual columns

    insert into tmp( employee_id, first_name, ... )
     values( a(i).employee_id, a(i).first_name, ... );
    

    Justin

  • ORA-00947 enough values but enough of values is returned.

    I know it sounds pretty obvious, but I am at a loss.

    I created a package with some types, and everything has been very good compilation. However, when I ran the new feature, I got an error:
    ORA-21700: object does not exist or is marked for deletion

    After a little research, I realized that the types must be declared outside of the package.

    As soon as I did it, I suddenly started getting error "not enough of values" on any of my. I compared the number of columns returned and the number of columns in the type, and they match.

    Here is my code of type:
    CREATE OR REPLACE TYPE  TSA_CUSTOM.Lost_Plan as object ( 
       LP_Key number,  -- The member key of the plan that is going away
       LP_Type varchar2(20),
       LP_Dept varchar2(12),
       LP_SubDept varchar2(12),
       LP_Class varchar2(12),
       LP_VendorName varchar2(50)
       );
       
    CREATE OR REPLACE TYPE  TSA_CUSTOM.Target_Plan as object (    
       Tgt_Key number, -- The member key of the plan that the Lost plan data will be moving to
       Tgt_Dept varchar2(12),
       Tgt_SubDept varchar2(12),
       Tgt_Class varchar2(12),
       Tgt_VendorName varchar2(50)   
       );   
       
    CREATE OR REPLACE  TYPE  TSA_CUSTOM.Output_Plan as object ( 
       LP_Result varchar2(8), -- Either 'MOVED' or 'DROPPED'
       LP_Key number,  -- The member key of the plan that is going away
       LP_Type varchar2(20),
       LP_Dept varchar2(12),
       LP_SubDept varchar2(12),
       LP_Class varchar2(12),
       LP_VendorName varchar2(50),
       Tgt_Key number, -- The member key of the plan that the Lost plan data will be moving to
       Tgt_Dept varchar2(12),
       Tgt_SubDept varchar2(12),
       Tgt_Class varchar2(12),
       Tgt_VendorName varchar2(50)   
       );
    /  
       -- table of lost plans
    CREATE OR REPLACE TYPE TSA_CUSTOM.Lost_Plans as table of tsa_custom.Lost_Plan;
       
    CREATE OR REPLACE TYPE TSA_CUSTOM.Target_Plans as table of tsa_custom.Target_Plan;
       
    CREATE OR REPLACE TYPE TSA_CUSTOM.Output_Plans as table of tsa_custom.Output_Plan;
    /
    and this is one of the incriminated code snippets:
    function Calc_Lost_Plan_Moves return tsa_custom.Output_Plans pipelined
    is
    -- define the lost plan recordset
    v_LP_Store tsa_custom.Lost_Plans;
    
    v_Tgt_Store tsa_custom.Target_Plans;
    
    v_Output_Store tsa_custom.Output_Plans;
    
    Begin
    
    -- Get all the vendor class lost plans
    select ep.ra_member_key , 'Vendor Class', ep.dept_cd, ep.subdept_cd, ep.class_cd, ep.vendor_name_id bulk collect into v_LP_Store 
    from (select distinct ra_member_key , dept_cd, subdept_cd, class_cd, vendor_name_id, class_member_id
          from tsa_custom.v_ep_vendor_class) ep
        ,(select distinct 'CL'||class_hier_cd as class_cd, vndr_nm 
          from mdm_publish.v_planning_master) mdm
    where ep.class_member_id   = mdm.class_cd(+)
    and   ep.vendor_name_id    = mdm.vndr_nm(+)
    and   mdm.class_cd is null;
    Any help would be appreciated.

    Thank you!
    John

    Hello

    v_LP_store is defined as an array of objects, then you will need to collect objects in there, not the columns in bulk:

    select TSA_CUSTOM.Lost_Plan(
             ep.ra_member_key
           , 'Vendor Class'
           , ep.dept_cd
           , ep.subdept_cd
           , ep.class_cd
           , ep.vendor_name_id
           )
    bulk collect into v_LP_Store
    from
      ...
    

    I created a package with some types, and everything has been very good compilation. However, when I ran the new feature, I got an error:
    ORA-21700: object does not exist or is marked for deletion

    Sometimes, this error is resolved by simply disconnecting the session and reconnect.

    After a little research, I realized that the types must be declared outside of the package.

    Are you sure?
    Packed types can be used to support the pipeline functions (defined in the same package).
    Oracle will create transparent and manage objects corresponding SQL types.

    Edited by: odie_63 Dec 18. 2012 20:15

  • Not enough memory RAM for EDU-ICM-1301 - VMware - SAMPLE Training Services - on request in the system class: vSphere install, configure, manage course 5.5

    Hello

    I'm looking for the laboratory "EDU-ICM-1301 - VMware education Services - SAMPLE - in class on request: vSphere install, configure, manage course 5.5" but trying to follow the instructions

    LabFiles\vCenter GA Installer

    1. Double-click autorun.exe , click run.
    2. If the security warning dialog boxes appear, click run to continue.

    the installation does not work with because the memory is not enough.

    Have you ever tried this workshop?

    You have a solution for this problem?

    Thank you

    Hello

    Yes we have seen several times.

    The simple solution is to install ONLY the Client vSphere and not all vCenter Server.  Specified in the manual, but it is up to the user that installation of the client is the option left on the halfway point in the Setup user interface.

    Thank you.

  • Unable to power on the virtual machine after phasing out: 'are there not enough licenses... ". »

    The topic explains quite well what is happening.  I am trying to feed a virtual machine that has been closed gracefully to add memory, and now we get an error with the status "there are not enough licenses installed to perform the operation.  I went to 'Licenses' under 'Administration' and it does not to be any shortage of licenses.  Can someone help me with this?    I'm dead in the water right now with an unhappy customer...

    Thanks in advance-

    Steve

    Maybe this article will be useful?

    http://KB.VMware.com/kb/7114568

  • INSERT INTO table (columns...) with table_tmp in select... ...

    Hi guru,.

    Is less than a valid SQL | Statement of PLSQL? or several instructions and what it does?

    insert into table (col1, col2, col3, col4)
    with table_tmp as
    (select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
    from table1, table2 t2 t1
    where t1.id = t2.id
    and t2.start > sysdate()
    )
    Select tcol1, tcol2, tcol3, tcol4
    of table_tmp tt1, table3 t3
    where tt1.id = tt3.id;

    I checked the SQL quick reference card and don't see anything similar to this... I wonder where I can find a better book of reference for the syntax.

    Thanks in advance
    KH

    user5885318 wrote:
    Is less than a valid SQL | Statement of PLSQL? or several instructions and what it does?

    It inserts data into the table

    insert into table (col1, col2, col3, col4)

    (ok, ignoring the fact that you can't have a table named table)

    using the select statement located below

    with table_tmp as
    (select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
    from table1, table2 t2 t1
    where t1.id = t2.id
    and t2.start > sysdate()
    )
    Select tcol1, tcol2, tcol3, tcol4
    of table_tmp tt1, table3 t3
    where tt1.id = tt3.id;

    I checked the SQL quick reference card and don't see anything similar to this... I wonder where I can find a better book of reference for the syntax.

    SQL reference documentation contains the complete syntax for Oracle SQL, so how can you find a better reference for the syntax. I think your concept to better is all simply because you are not familiar with things and don't know where to find things. SQL is a huge beast, so you cannot expect to find things very quickly in all cases, especially if you don't really know what you are looking for.

    I'm guessing you are struggling to find information about the clause "WITH"?

    It is called subquery factoring and lie under the SELECT statement in the SQL reference:

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/statements_10002.htm#i2161315

    An equivalent statement without the WITH clause (using your insert as a base statement)...

    insert into table(col1, col2, col3, col4)
    select tcol1, tcol2, tcol3, tcol4
    from (select ccol1, ccol2, ccol3, ccol4, ccol5, ccol6
          from table1 t1, table2 t2
          where t1.id=t2.id
          and t2.start > sysdate()
         ) tt1
         , table3 t3
    where tt1.id=tt3.id;
    

    The done WITH clause takes the subquery in the main query. This is useful if the same subquery is needed more than once in the main query.

  • Why am I not able to insert into the table object? Is this a bug? Probably not, but confused here

    Salvation of france

    Thank you for your intelligent help, but if you don't know about object types and tables of onject, just go your way.

    I use 12 c (12.1.0.2) on OEL 6,7 in Virtual box

    Here's my use case

    drop table envparams;

    Drop type envparam_obj;

    Drop the params table;

    Drop type param_obj;

    create or replace type param_obj as an object

    (

    PName varchar2 (32),

    RegExp varchar2 (128).

    GetName member function returns a varchar2.

    function GetRegexp return varchar2 Member,

    Member ToString function returns a varchar2.

    procedure Display of Member

    );

    /

    create or replace type body param_obj as

    member function GetName return varchar2 is

    Start

    return (PName);

    end;

    member function GetRegExp return varchar2 is

    Start

    return (RegExp);

    end;

    member function ToString return varchar2 is

    OutStr varchar2 (1000);

    Start

    OutStr: = 'parameter ' | PName;

    If (RegExp is not null) then OutStr: = OutStr | ' use control regexp ("|") RegExp | ')'; end if;

    return (OutStr |) '.');

    end;

    Members procedure display is

    Start

    dbms_output.put_line (self. (ToString());

    end;

    end;

    /

    create table param_obj params (key primary pname) object identifier is a primary key;

    create an index only params_un01 on params (upper (pname));

    insert into values params (new param_obj ("nls_lang", null));

    Select * from params;

    Select params Ref (p) rparam p where p.pname = 'nls_lang. "

    drop table envparams;

    Drop type envparam_obj;

    create or replace type envparam_obj as an object

    (

    paramref Ref param_obj,

    sys.ANYDATA pValue,

    REF. param_obj, GetParamRef member function return

    sys.ANYDATA, GetPValue member function return

    Member ToString function returns a varchar2.

    procedure Display of Member

    );

    /

    create or replace type body envparam_obj as

    REF param_obj is back from GetParamRef member function

    Start

    return (ParamRef);

    end;

    member function GetPValue return sys.anydata is

    Start

    return (PValue);

    end;

    member function ToString return varchar2 is

    OutStr varchar2 (200);

    TypeCode pls_integer;

    ValueType sys.anytype;

    Number num.

    Str varchar2 (20000);

    Dummy Pls_integer;

    Start

    Select deref (ParamRef). ToString() in double OutStr;

    If (PValue is not null) then

    TypeCode: = PValue.GetType (ValueType);

    case TypeCode

    When dbms_types.typecode_number then

    Dummy: = PValue.GetNumber (NB);

    Str: = to_char (Num);

    When dbms_types.typecode_varchar2 then

    Dummy: = PValue.GetVarchar2 (Str);

    end case;

    OutStr: OutStr = | "The value is (' |)" Str | ')';

    on the other

    OutStr: OutStr = | "The value is (NULL);

    end if;

    return (OutStr |) '.');

    end;

    Members procedure display is

    Start

    dbms_output.put_line (self. (ToString());

    null;

    end;

    end;

    /

    create the table envparams to envparam_obj;

    create or replace procedure as

    ThisParamRef ref param_obj;

    ThisParam param_obj;

    ANYDATA ThisValue;

    ThisEnvParam envparam_obj;

    Start

    SELECT ref (p), value (p), anydata.convertvarchar2('FRENCH_FRANCE.) WE8ISO8859P1 ") in ThisParamRef, ThisParam, ThisValue"

    params p WHERE p.PName = 'nls_lang. "

    ThisEnvParam: = envparam_obj (ThisParamRef, ThisValue);

    ThisEnvParam.Display ();

    INSERT INTO envparams

    Envparam_obj SELECT (Ref (p), anydata.convertvarchar2('FRENCH_FRANCE.) WE8ISO8859P1'))

    OF params p

    WHERE p.PName = 'nls_lang. "

    end;

    declare

    Start

    test;

    end;

    test is what gives:

    RA-22979: impossible to insert a REF to a view object OU a REF defined by user (translation is below...)

    ORA-06512: at "MMN. "TEST", line 16

    ORA-06512: at line 3

    22979 00000 - "cannot INSERT object REF or REF user-defined view.

    * Cause: Attempt to insert a view of the REF or REF object defined by the user in one

    Column REF created to store the system generated REF values.

    * Action: Make sure that the REF to be inserted is not a view object

    or a REF configurable column *.

    If I change the test and write:

    INSERT INTO envparams values (ThisEnvParam); = > Get the same message

    ORA-22979: impossible to insert a REF to a view object OU a REF defined by user

    ORA-06512: at "MMN. "TEST", line 16

    ORA-06512: at line 3

    22979 00000 - "cannot INSERT object REF or REF user-defined view.

    * Cause: Attempt to insert a view of the REF or REF object defined by the user in one

    Column REF created to store the system generated REF values.

    * Action: Make sure that the REF to be inserted is not a view object

    or a column defined by the user REF

    If I modify the testing and writing

    insert into envparams values (envparam_obj (ThisParamref, ThisValue));

    ; = > Get the same message

    ORA-22979: impossible to insert a REF to a view object OU a REF defined by user

    ORA-06512: at "MMN. "TEST", line 16

    ORA-06512: at line 3

    22979 00000 - "cannot INSERT object REF or REF user-defined view.

    * Cause: Attempt to insert a view of the REF or REF object defined by the user in one

    Column REF created to store the system generated REF values.

    * Action: Make sure that the REF to be inserted is not a view object

    or a column defined by the user REF

    WELL, I'm stuck in the stuckhouse.

    How can I make the test work

    Thanks again for reading me

    Concerning

    Michel M - N

    The error message gives an indication of what is wrong:

    Failed to INSERT the object REF or REF user-defined view

    In this case, you have a REF user-defined because you based the table OID of PARAMS on the PK.

    Storage of such a REF is possible only if it is worn, as explained in the documentation:

    https://docs.Oracle.com/database/121/ADOBJ/adobjadv.htm#ADOBJ7393

    Like this:

    create the table envparam_obj envparams)

    scope for (paramref) params

    ) ;

    or on the existing table:

    ALTER table envparams Add (scope (paramref) params);

    SQL> INSERT INTO envparams
      2  SELECT envparam_obj (ref (p), anydata.convertvarchar2('FRENCH_FRANCE.WE8ISO8859P1'))
      3  FROM params p
      4  WHERE p.PName = 'nls_lang';
    
    1 row created.
    
    SQL> select t.paramref.getname() from envparams t;
    
    T.PARAMREF.GETNAME()
    --------------------------------------------------------------------------------
    nls_lang
    
  • What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    Mr President.

    What is wrong with this sequence, it does not work when, after 3 inserts, I add a new record with the trigger it gives an error.

    --SL_CUSTOMERS table data
    
    
    INSERT INTO SL_CUSTOMERS VALUES(1,'Kamrul Hasan',NULL,NULL,'Moghbazar', 'Dhaka','0456789123',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(2,'Rabiul Alam',NULL,NULL,'Motijheel', 'Dhaka','0567891234',NULL,NULL,NULL,'Y',NULL);
    INSERT INTO SL_CUSTOMERS VALUES(3,'Shahed Hasan',NULL,NULL,'2-G/1,2-2,Mirpur', 'Dhaka','0678912345',NULL,NULL,NULL,'Y',NULL);
    
    
    
    

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG 
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"   
    FOR EACH ROW   
    BEGIN   
    IF :NEW.CUSTOMER_ID IS NULL OR :NEW.CUSTOMER_ID < 0 THEN  
      SELECT SL_CUSTOMERS_SEQ.nextval   
        INTO :NEW.CUSTOMER_ID  
        FROM DUAL;   
      END IF;   
    END;   
    /
    
    
    
    

    When I try to insert several records with the seq.nextval it gives error

    violation of primary key.

    INSERT INTO "ALIZA"."SL_CUSTOMERS" (CUSTOMER_NAME) VALUES ('sdfsd')
    ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    One error saving changes to table "ALIZA"."SL_CUSTOMERS":
    Row 4: ORA-00001: unique constraint (ALIZA.SL_CUSTOMERS_PK) violated
    ORA-06512: at line 1
    
    
    
    
    
    
    
    

    Concerning

    Mr President.

    I find the solution by creating a function before the triiger

    as below

    CREATE SEQUENCE  "ALIZA"."SL_CUSTOMERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
    
    CREATE OR REPLACE FUNCTION get_SL_CUSTOMERS_vId RETURN VARCHAR2 AS
    BEGIN
       RETURN SL_CUSTOMERS_SEQ.NEXTVAL;
    
    END;
    /
    
    CREATE OR REPLACE TRIGGER SL_CUSTOMERS_TRG
    BEFORE INSERT ON "ALIZA"."SL_CUSTOMERS"
    FOR EACH ROW
    DECLARE
    dummy VARCHAR2(200);
    BEGIN
      dummy := get_SL_CUSTOMERS_vId();
      :NEW.CUSTOMER_ID := dummy;
    END;
    /  
    

    It works very well

    Thank you all for the suggestions.

    Concerning

  • Video will not insert into the timeline

    OK, so video and audio will be both be switched on timeline when I create a new sequence by dragging the "new item" icon.


    BUT


    When I drag a clip in one existing sequence that has the same parameters as the video I am dragging, inserts audio only in the timeline .


    Using images directly to the output of the GoPro camera. 1080 p @ 60 fps.

    Checks:

    > I tried dragging directly to the timeline

    > tried clicking on the button "insert."

    > tried to use option only drag "Video".

    > V1, V2 etc are highlighted / activated.

    > no video tracks are silent.

    > I tried all audio tracks to see if it would force to insert video or audio video insert inhibition.

    > if I create a new sequence with the clip of the said and then copy I can paste it into the original sequence clip said wouldn't drag/insert on to.

    > if I select several clips and drag on a new sequence with 'New element', they will insert all with video and audio.

    I found nothing on Google which approached except 2 people who have the opposite problem, which was not inserting audio but not their solution was that they have simply not A1. A2 has highlighted.

    Hi, its probably all in the source patch tracks.

Maybe you are looking for

  • HP Deskpro: Lack of network/Ethernet drivers

    My computer has been acting up and full of clutter. Has taken almost 2 minutes to start. I knew not what half the Junk was so I just backed up on a USB stick and re-installed Windows 7 home 64 Professional with the disk I got with the computer. Could

  • fingerprint reader error

    I have a laptop HP ENVY dv6 - 7247cl. Warranty is over. Problems with the Pass Simple fingerprint sensor. I tried to uninstall and reinstall the driver of Simple and Validity Sensor passage several times without success.  I had problems with my Norto

  • Disable all Windows Vista updates

    I work for a school district. These machines are in a lab environment. I work with Windows Vista on a Mac computer using boot camp. We also have Deep Freeze installed on the computer with Vista. Since we have installed Deep Freeze we don't need updat

  • How to install adobe flsh player with internet explore 8

    the computer crashes when I install flash player

  • Windows Mail in the area too large font

    I reformatted my computer.  When I have my settings, somehow, I changed the font of my windows mail.  All messages are too long in all of my folders, not real email.  I did it at home in Windows mail and I accidentally made to work in Outlook. I don'