Insert the script

Hi friends,

Below the insertion fails with ora-00907 when I use the command by in the sub query... Table tab1 has 28 columns to insert so I haven't posted

the entire script...

Insert into tab1 (sign_no,..., s_type,...)

Select

's' || CS.content_no,

...,

(by selecting s.sign_type in s_det s

where s.curr_type = (select min (v.curr_type) from v_det by v.content_no v)) S_TYPE,.

...

content_sales CS;

ERROR on line 16:

ORA-00907: lack of right parenthesis

Here are a few records from table v_det. Each content_no, to compare with min (v.curr_type) and s.curr_type in the where clause.

SQL > select * from v_det;

CONTENT_NO CURR_TYPE

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

J23 235541231

J23 235541234

A35 6712343

A34 6712343

Help, please... Thank you all very much.

Oops, I missed FROM clause:

Insert

(tab1)

sign_no,

S_TYPE

)

with t as)

Select' | CS.content_no content_no,

(

Select min (v.curr_type)

of v_det v

where cs.content_no = v.content_no

) min_curr_type

CS content_sales

)

Select content_no,

(

Select s.sign_type

of s s_det

where s.curr_type = t.min_curr_type

) S_TYPE

t

/

SY.

Tags: Database

Similar Questions

  • PLSQL insert the Script

    Hi all

    I'm new to PL/SQL and I really need help.

    I want to create a script, could be using loops, conditions, etc. that I have to insert into the Table records two departments. The first record must insert DEPARTMENTS_ID_SEQ. NEXTVAL, FA and the second record must insert DEPARTMENTS_ID_SEQ. NEXTVAL and education in the DEPARTMENTS table.

    Instead of manually insert each record, I would like to create a script that could insert records automatically when the script is called.



    INSERT INTO DEPARTMENTS (department_id, department_name, manager_id, location_id)
    VALUES (DEPARTMENTS_ID_SEQ. NEXTVAL, 'Education', 200, 1700);

    INSERT INTO DEPARTMENTS (department_id, department_name, manager_id, location_id)
    VALUES (DEPARTMENTS_ID_SEQ. NEXTVAL, 'Administration', 200, 1700);


    Any suggestion?

    I thank very you much in advance!

    Marcelo

    Hello

    You can create your sql file in which you write your insert statements:

    INSERT INTO DEPARTMENTS(department_id, department_name, manager_id, location_id)
    VALUES(DEPARTMENTS_ID_SEQ.NEXTVAL,'Education',200,1700);
    
    INSERT INTO DEPARTMENTS(department_id, department_name, manager_id, location_id)
    VALUES(DEPARTMENTS_ID_SEQ.NEXTVAL,'Administration',200,1700);
    

    . Suppose you call this sql file insert_script.sql.
    When you are connected to sqlplus, to execute this sql file, you use @ followed by the path of your sql file. Example:

    SQL > @ "C:\test\insert_sql.sql".

    The command above is for the case that I put insert_sql.sql in the C:\test directory.
    If the sql file to run in the current directory, you can just issue: @.

  • How to generate the script to insert data tables present in a

    How to generate the script to insert data from one table in an entire schema under environment sqlplus




    with toads it please help me please!

    905310 wrote:
    How to generate the script to insert data from one table in an entire schema under environment sqlplus
    with toads it please help me please!

    The correct method by using the pump of the database or import/export or unload the data in CSV format for loading using SQL * Loader.

    Generate instructions insert with literals is very bad choices - the bind variable is missing. It will be quite slow because many other CPU cycles are spend on hard analysis. The shared pool will become fragmented. This can cause errors of memory for other applications when they attempt to analyze SQLs for cursors.

  • Insert the SQL script for BLOBs

    Hello

    I managed to upload my word and pdf documents in the database using blob support APEX and have these columns in the MY_DOC table

    , VARCHAR2 (400) FILE NAME NOT NULL
    BLOB_CONTENT BLOB
    , VARCHAR2 (48) MIME_TYPE

    Now I want to migrate the data to another environment by using an insert SQL script, how to respond to the BLOB column in the insert script?

    Kind regards

    ADE

    You cannot migrate data blob with insertion of scripts. However, you can achieve this by using the datapump...

    Example:

    expdp sysadm/sysadm tables = dumpfile = dump.dmp logfile = expdp_dump.log patterns =
    Impdp sysadm/sysadm dumpfile = dump.dmp

    BR,

    Nico

  • How to insert a < script > code before the < / head > tag?

    I would like to insert a < script > code inside pages of my site, and it should be placed before the < / head > code.

    Can I handle this with muse? Otherwise, every time when I export the site in HTML, I need to open the files updated and copy and paste the SCRIPT code in the HEAD again.

    Adding scripts to the head section of your documents is not currently supported in Muse, however it is planned for future versions of Muse.

    You can add links to the scripts by using the object-> Insert HTML code, but it will be inserted at roughly the position of the element in HTML page.

  • script to insert the new master on all other pages

    I have an indesign document with 131 pages (front of postcards). I should add the back of the postcard (master) for all other pages. I don't want to do it manually because of the time and that I will need to do this again. Someone at - it a script that will allow insertion of still blank pages on pages of numbered and then I can apply the master page to all pages?  Something will help you. Thank you!!

    Just found out that the script on this forum http://forums.adobe.com/message/3223771#3223771#3223771 does it perfectly.

  • Message: "an error has occurred in the script.' when tried to open services

    Original title: Internet Explorer Script error

    When I go to administrative tools, and open Services, a notification stating 'an error has occurred in the script.'

    Online: 31

    Tank: 12

    Error: Library not regisetred

    Code: 0

    URL: res://C:\WINDOWS\System32\mmcndmgr.dll/views.htm

    Pls help me solve the problem.

    I am using windows xp sp3 and IE 8

    Hi daveliew1998,

    Try these steps and check the result.
    Step 1: Scanner of sfc (System File Checker) to see if any system file is missing or damaged. To do this, try the following steps:
    a. Click Start, click Run, type cmd and click ok.
    b. at the command prompt, type sfc/scannow and press ENTER.
    c. once the analysis is complete, restart the computer and check if the problem persists.

    Note: You will be asked to insert the Windows XP disk, if a file is missing.

    For more information, see Description of Windows XP System File Checker (Sfc.exe)

    Step 2: If the problem continues, check if it runs in safe mode, and you might consider the publication of details for further assistance
    See start the computer in safe mode

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to insert a script in an HTML document.

    How to insert a script in an HTML document.

    Abd there is always done on the fly, of course...

    e.g. Dynamic insertion of webworks

    var bbww = document.createElement("script");
    bbww.src='local:///chrome/webworks.js';
    bbww.type = 'text/javascript';
    document.getElementsByTagName('head')[0].appendChild(bbww); // Inject webworks
    
  • OSD version 4.1.1.19 is not formatting out of the Script as planned

    After upgrading to 4.0 of OSD, I noticed that when I use the output of the script window, it wraps the output of the script to about 80 characters.

    When I use the command 'SET SQLFORMAT ANSICONSOLE' it seems to provide me with the long expected rows of data including the headers I expect.

    When I close my OSD and restart the packaging back.


    I also found that I can not use the performance indicators and to make them work.

    SELECT /*csv*/ * FROM scott. EMP;

    SELECT /*xml*/ * FROM scott. EMP;

    SELECT / * html * / * FROM scott. EMP;

    SELECT / * delimited * / * FROM scott. EMP;

    SELECT / * Insert * / * FROM scott. EMP;

    SELECT / * charger * / * FROM scott. EMP;

    SELECT / * fixe * / * FROM scott. EMP;

    SELECT / * text * / * FROM scott. EMP;

    I remember at one point several months back I opened SQLPlus and he did a window exit changes but I wasn't expecting to have an impact in the OSD.

    I am running the OSD 4.1.1.19 64 bit on Windows 7 64 bit.

    Thanks in advance for any help you can provide.

    -Tom

    Create a script with all your settings.

    Defined in this script to run at login preferences.

    Response of long form here.

  • Returns the script error / complete the action?

    Hello

    I added a script action through 'menu command insert. The script can detect an error condition (selection does not meet the expectations of the script). In this case, I want to put an end to the action that calls the script. The best I can get so far shows a dialog box "press ok to continue if there is no error message.

    I can make the script has an error (for example, by calling exit() function does not exist after an alert), but the action proceeds

    Concerning

    There is no direct way to stop an Action when he started, a way I think to work around the limitation is perhaps unload action? not tested, just an idea, we can not work, try it and let us know.

    Another idea, create an empty document so your action tries to continue to work on it and it will fail, no big deal, it depends on what kind of error it gives you,

  • Insert the value in table in the business object

    Hi all

    I want to send a request to a web service (via the SOAP component) which accepts the array as one of the input parameters.

    I am confused.i can set table in the subject of Bussiness, but she accepts no values.how can I insert value in it.

    can someone guide me?

    Thanks for providing the XSD.

    That I can tell that you are using Oracle BPM 12 c.  It's a good thing for you, because the insertion of new elements in an array in 11g is a little more difficult.  Ignore all my previous posts on this thread, because they are needed only for 11g.

    Here's an Oracle BPM 12 c project you can download that uses your XSD and fills the chart "to" inside her: https://drive.google.com/file/d/0Bwqetn0fpi74SE1TM2swR3VJMXM/view?usp=sharing

    Included is a video you can watch that goes through this, but the steps to add items to an XSD based table in Oracle BPM 12 c using Groovy script are:

    1 use your XSD in the thread above to create a new business object in the catalog (remove the '///it's table."comment in your XSD before doing so).

    2. Add a new object to process data in your process that uses this business object (a process known as "amin" in my process data object (I added).  Add another object to process of string data (I added one called "newItemToAdd").

    3. Add a Script of the activity in your process of-> right mouse click-> click on 'go to the Script.

    4 with the dialog script Groovy upward, to add a single element to your table add this Groovy script:

    "amin" and "newItemToAdd" are the objects of load data useful process added in step 2

    Amin.to.Add ("0" + newItemToAdd)

    5. to prove that multiple items can be added to the table at the same time, add this logic below.  The text in the square brackets could be a set separated by commas of string variables that would have been added to the table:

    for (int i = 1; i)< 5;="" i++)="">

    amin.to.addAll ([i + "" + newItemToAdd])

    }

    Hope this helps,

    Dan

  • problems with the script in indesign

    Hi all

    I'm new and scripts so I hope I can explain what I need

    Well, I have an indesign file in which I need to insert an extra layer with the translation of a language, have a layer IN English and an extra a FR for the french.

    I found a script that's like that

    with (app.clipboardPreferences) {}

    pasteRemembersLayers = true;

    }

    var docTarget = app.documents.itemByName ('French.indd');

    var docSource = app.documents.itemByName ('French.indd');

    If (docSource.isValid & & docTarget.isValid) {}

    var numSpreads = docSource.spreads.length;

    for (var i = 0; i < numSpreads; i ++) {}

    app.activeDocument = docSource;

    app.activeWindow.activeSpread = app.activeDocument.spreads [i];

    App.Select (App.activeDocument.spreads [i] .allPageItems);

    If (app.selection.length > 0) {}

    app. Copy ();

    app.activeDocument = docTarget;

    If (app.activeDocument.spreads [i] .isValid) {}

    app.activeWindow.activeSpread = app.activeDocument.spreads [i];

    app.pasteInPlace ();

    }

    }

    }

    }

    but it seems to cause problems with the files,

    I have to say that the source is a file very heavy, even enter takes a long time.

    but I want to just get into the text layer,

    Do you think this script works finally, can you spot an error or something?

    Hello

    Your script is copying content of any doc (allPageItems) in an another doc - all number two need to have equal variances.

    You don't need to run the script if your goal is to create the new layer in the existing doc.

    The questions are

    What elements of the page must be copied into this layer

    AND

    should bound texts copied frames play any content

    AND

    wherever the content come from?

    Jarek

  • Put the active table in respect of the development when the script was interrupted by a dialog box

    I adapted a script which browse tables in a file of Fm and asks the user if he wants the current to be reformatted or not active table

    I have not find a clean way to the table that is currently selected in the variable "tbl" or visible on the screen when the scripts sends a dialog box.

    The workaround I found is to launch a format on the table before sending the guest, in this case the table processing is apparent when the prompt arises.

    But I would like to have the visible table and avoid doing all the treatments on the table until the user has had a chance to respond to the prompt.

    I guess that there must be a method to draw the attention of the active window on an item that is selected in a variable?

    function ApplyTableFormat (doc)
    {
    If (doc.) ObjectValid())
    {
    var tbl is doc. SelectedTbl
    var tbltitle;
    var tblTextItem;
    While (tbl. ObjectValid())
    {
    tbltitle = "";
    tblTextItem = tbl. FirstPgf.GetText (Constants.FTI_String);
    for (var i = 0; i < tblTextItem.length; i ++)
    {
    tbltitle += tblTextItem [i] .sdata;
    }

    / * How my "tbl" visible in the window active doc? */
    If (Alert ("format:" + tbl.)) "Tbltitle + FirstPgf.PgfNumber + '? \nClick Cancel to abort. ((', Constants.FF_ALERT_CANCEL_DEFAULT))
    return;
    / * Insert here the table formatting code * /.

    TBL = tbl. NextTblInDoc;
    }
    }
    on the other
    {
    Alert ('no active doc', Constants.FF_ALERT_CONTINUE_WARN)
    return
    }
    }

    There is a document feature that allows to scroll the window to a location of particular text:

    doc. ScrollToText (textRange);

    You might be able to do something like this:

    doc. ScrollToText (new TextRange (tbl. TextLoc, tbl. TextLoc));

    -Rick

  • Access error of data while running the script in the script fdm workbench Editor

    Hello Experts,

    I get the error when I run the script in the script of fdqm established client.this editor is the error

    -2147467259 data access error and he navigates the error on line 30 on this script «Set rsAppend = DW.» DataAccess.farsTable (strWorkTableName).

    Please return me asap where I should charge peoplesoft data to one of my database of planning through fdm.

    Thanks in advance...

    You will need to build a script for integration that is an import Script that allows you to import data from SQL in FDM.

    When you create your import format, you will need to configure it with the file Type = Script and then assign the script of integration as an Expression. Assign your import format to the location that you use to import data.

    Then you can test it by going to the import stage and clicking the import button. FDM will run the integration script and data import by running the SQL query that you have defined.

    To the contrary, "Data Pump" import Scripts are used as import expressions in the import formats

    You can run a script to integrate the customer that this script requires input parameters that are passed only when then FDM import step is executed. If you want to see the raised error open the errorlog FDM. You will only be able to run this Workbench script when you want to debug data is being extracted, but in this case, you will need to comment code that inserts the data in the table. Don't forget that the work table is a temporary table that is created when you click on the import button and if you run Workbench this table does not exist

  • Question about the image of the user interface of the Script

    Hello world

    We can insert a picture into script

    Like this:

    var l is new window ('dialog', 'Testing');.

    var pictures = w.add ('image', undefined, the record ("" ~ / Desktop/mingxing2.jpg ""));

    w.Show ();

    But is it possible to say the script if you do not find the photo, we have the second choice

    Like this:

    var l is new window ('dialog', 'Testing');.

    var pictures = w.add ('image', undefined, of the file ("~ / Desktop/mingxing2.jpg" |)) (("" ~/Desktop/mingxing3.jpg "));

    w.Show ();

    or third choice...

    Thank you

    Respect of

    Teetan

    Hi Teetan,

    Why not call a function that returns the file you need?

    var getImageFile = function () {}

    var f = file (Folder.desktop+"/monImage.jpg');

    ! f.exists & f = file (Folder.desktop+"/image.jpg');

    ! f.exists & f = not defined;

    return f;

    }

    var l is new window ('dialog', 'Missing Image?');.

    flowers of the var = w.add ('image', the undefined, getImageFile());

    w.Show ();

    HTH,

    Loïc

Maybe you are looking for

  • Qosmio G40: TV Tuner does not not in Windows 7 64 bit

    Hello After months of patience and according to the pilots-info on the Toshiba site, I found it was time to replace my ultimate Vista32 with Windows7 Ultimate. It seemed that all drivers now have a 64-bit Windows 7 version, missing drivers / software

  • Check if a path exists or if it is not a path

    Hello I want to read data from a file of worksheet in a part of the application, that I am building but to read these data I want check first if the path exists or not, since I'm only wnt to read that data, if there is such a file. I tried to use a f

  • 8.1 Windows and XP - internet access

    I have 3 computers on network MSHOME. 2. use XP. I just added a computer 8.1. When I access internet on my XP computer it comes up with the message: Web page you requested is currently offline. To view, click on connect. Sometimes, he also asked if I

  • Problem printing color MF8350Cdn

    All color prints had a tinge of pink, replaced the bars horozontal toner magenta & cyan, blue now Thank you

  • Windows update fails on XP Pro SP3 with 0x8007F064 error code.

    Windows update fails repeatedly on XP Pro SP3 with 0x8007F064 error code: Update security for Windows XP (KB2661637)A security update cumulative for Internet Explorer 8 for Windows XP (KB2647516)Update security for Windows XP (KB2660465) Update works