ORA-00900 when you use the command COPY with dynamic SQL

Helllo,
I created the following procedure:

create or replace procedure copyTable (pSourceTableOwner IN varchar2
pSourceTableOwnerPasword IN varchar2
pTargetTableOwner IN varchar2
pTableName IN varchar2
pDatabaseLink IN varchar2)
as

vStatement varchar2 (250): = null;

Start

vStatement: = "copy of". pSourceTableOwner | '/' || pSourceTableOwnerPasword | '@' || pDatabaseLink |
"Insert" | pTargetTableOwner | '.' || pTableName | ' using select * from '. pTableName;

immediately run vStatement;

end;
/

The generated command (variable vStatement) looks like this:
"Insert a copy of O_GLCEN/o_glcen@SELLENTW o_jh. "X_PLZ_CD_MERGED_CTIS using select * from X_PLZ_CD_MERGED_CTIS".

When you call this procedure as "exec copyTable ('O_GLCEN', 'o_glcen', 'o_jh', 'X_PLZ_CD_MERGED_CTIS', 'SELLENTW');" the following lifts:

FEHLER in line 1:
ORA-00900: invalid SQL statement
ORA-06512: at "SYSTEMTECHNIK". COPYTABLE", line 20
ORA-06512: at line 1

But when you call the command COPY directly from SQL prompt the statement runs without error.
Is in general not possible to use the dynamic COPY with SQL command? If it is possible does anyone has an idea what I am doing wrong?

Any help will be appreciated...

Rgds
JH

I would like to use something like

vStatement: = ' start in f (select * from ' | pSourceTableOwner |) '.' || pTableName | '@' || pDatabaseLink | Insert loop ') in ' | pTargetTableOwner | '.' || pTableName | "f-values; end loop; end; »
immediately run vStatement;

Tags: Database

Similar Questions

  • When you use the Polygonal Lasso with 13 elements, I get the message 'no pixels are not selected to more than 50% ' why and how to remedy?

    When you use the Polygonal Lasso with 13 elements, I get the message ' WARNING: no pixel is selected to more than 50 percent. "  Why - and how to fix it?

    Make sure that the correct layer is selected.

    Decrease the amount of feathers.

  • ORA-01789 - when you use the operator of TABLE and SEM_MATCH

    Client version: 11.1.0.7 on Windows 7 (32 bit)
    Server version: 11.2.0.3 on Windows 7 (64-bit)

    I am model prototyping a simple RDF, and I'm getting a ' ORA-01789: block has an incorrect number of columns in query results "when you use the SEM_MATCH with the SCOREBOARD operator.

    I can run this:
    select id, a.triple.GET_TRIPLE() from drik.rdf_data a
    and the first line is:
    (<http://www.ihc.com/drik/term#2>, <http://www.w3.org/2000/01/rdf-schema#subClassOf>, <http://www.ihc.com/drik/term#1>)
    Now, I want to use the TABLE like this:
    select
      c
    from 
      table(sem_match('{ <http://www.ihc.com/drik/term#2> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?c . }', 
            sem_models('Prototype'),
            sem_rulebases('RDFS'),
            sem_aliases(sem_alias('rdfs','http://www.w3.org/2000/01/rdf-schema/')),
            null
            ))
    But this performance gives the ORA-07189. Even try SELECT * gives the same error.

    I expect to get a refund:
    <http://www.ihc.com/drik/term#1>
    How should I approach troubleshooting this?

    Thank you, Steve

    Thanks for posting the script. I was able to reproduce the error locally.

    The problem is the use of the sem_apis.create_rules_index () procedure, which has been deprecated:
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25609/sdo_rdf_newfeat.htm#autoId26

    Please use sem_apis.create_entailment () instead, and the error should disappear.
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25609/sem_apis_ref.htm#CHEHDGBD

    Thank you
    Matt

  • How to escape the quotes and commas when you use the command of the coil

    I am creating a file .cvs with data in my database. I call the function of coil and below select stmt

    ' Select ' ' ' | ID | '","' || name | '","' || Description | '","'

    I want everything to be separated by quotes and commas. Description data can have quotes and commas so how I get away from them in my queue code so that when I use SQL Loader data will get entries in the database correctly.

    Thank you!

    Hello

    If the field is closed, so there is nothing else you need to do for the column separator (en).

    To use the character encompassing ("") in the field, double it, the same way you use two single quotation marks to signify a single_quote into a SQL string literal:
    {code}
    ' SELECT ' ' ' | ID
    ||     '","'     || name
    ||     '","'     || REPLACE (description
    , '"'
    , '""'
    )
    ||     '"'
    FROM table_x;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    
  • OfficeJet pro 8600 vertical black lines printing when you use the scanner/copier of SMA

    I have an Officejet Pro 8600 Plus model N911g that I got a year out of warranty. Worked perfectly until this week when I scanned approximately 50 pages through the ADM.  During the process of digitisation of the black vertical lines began to appear on documents that are scanned or print (color or BW) through the ADM.  Scanning or printing directly from the scanner glass is not the problem.

    I checked, cleaned and cleaned all (rolls, strip scanning, scanning glass) it is possible via the information provide in these forums from other veins knows on their production lines.  No change...

    I unplugged the printer all the network and fax cables and tried scanning or copying with the power of the device, NO CHANGE.  Don't know what the next step might be other than the factory reset (don't have documentation on this process).  Additional suggestions would be appreciated.

    Bcrigler

    Hello

    Please go through this document from HP, this problem is because of the dust or some contamination on glass scalled

    http://support.HP.com/us-en/document/c02881567

    Here is a video, the printer is not JO 8600 but the mechanism is the same, then even this video will be a great help

    http://www.YouTube.com/watch?v=CGn7FJvH8sE

  • How to change the imbedding option when you use the command set?

    When I try to place any Illustrator (latest version) its automatically embedded file. Is it possible to change this, the file will be linked and not integrated?

    yarontm,

    Second action (I posted this an hour ago, or rather it could not display for some or no reason):

    Are you DoubleClicking the file? If you are, try just by clicking on it.

    If you are just by clicking on it, and it includes only, something is wrong.

    The following is a general list of things you can try when the question is not in a specific file (you tried/made some of them already). 1 and 2) are easier for temporary strangenesses and 3) and 4) specifically preferences might be corrupt); ((5) is a list in itself and 6) is the last resort.

    (1) close Illy and open again.

    (2) restart the computer (you can do that up to 3 times);

    (3) close Illy and press Ctrl + Alt + Shift / Cmd + Option + shift during startup (easy, but irreversible);

    4) move the folder (follow the link with this name) with closed Illy (more tedious but also more thorough and reversible);

    5 look through and try the relevant among the other options (click on the link with that name, item 7) is a list of the usual suspects among other applications which can disturb and confuse Illy, point 15) applies to the maybe CS5, CS6 and CC);

    Even worse, you can:

    (6) uninstall, run the vacuum cleaner tool (if you have CS3/CS4/CS5/CS6/CC), and then reinstall.

    http://www.Adobe.com/support/contact/cscleanertool.html

  • Error "Invalid line" when you use the command tableFile - ttImportFromOracle

    Execution of the order and got an error, as shown below:

    c:\oracle>ttImportFromOracle -oraConn myUser/myPassword@myDB -tableFile C:\oracle\table_list.txt
    Error: Invalid Line 'mySchema.myTable2' in file 'C:\oracle\table_list.txt'
    Use '-help' for more information
    
    

    table_list.txt looks to below, except I have 112 tables total in the list, a table by line, as indicated in the help documentation.

    mySchema.myTable

    mySchema.myTable1

    mySchema.myTable2

    I tried to make the file table_list.txt have only the table (without figure) names and the same error occurs.

    Invalid line is always the last table in the file. So if I take off the table she complains, she complains always just whatever the table is the last in the file.

    Can someone tell me what I am doing wrong?

    Thank you

    Matt

    To work around the error, I just used - tables instead.

  • When you use the batch, record with the same file name in the same folder.

    I therefore about 500 pictures that needs to be cropped. I created the cropaction and added a "backup" function and close in action, because I want the photos to be saved with the same file name in the same folder...

    Now I want that it take its course. But no, I have to press ok to confirm the backup on each photo.

    Someone knows how to fix this?

    BR

    Robert

    I solved it.

    I forgot to check the box "override save under ' :)

  • How can I solve very slow scrolling with the mouse when you press the command key? (MacBook Pro, Lion, no problem when using trackpad, no problem with other web browsers, other mice have the same problem)

    Scrolling speed is fine, but when you press the command key and then it becomes very slow.

    He does it with a mouse, but not with the trackpad.
    It does when the modules are disabled.
    No problem on Safari or Chrome.
    No problem on PC.

    I think it all started when I went form a MacBook with Snow Leopard on a MacBook Pro with Lion.

    Any help would be much appreciated.

    Thanks in advance!

    You use the mouse wheel to scroll?

    There are some prefs mousewheel, which control the behavior when you press the modifier keys.

    You can set the key to the action of each to 0 for normal scroll.

    See http://kb.mozillazine.org/About:config_entries #Mousewheel.

  • WHEN YOU USE THE CONSTRUCTOR OF MY SITE, I CAN'T COPY AND PASTE WROTE THE BROWSER SECURITY SETTINGS HOW TO NOT CHANGE THESE FOR ME TO COPY / PASTE?

    WHEN YOU USE THE CONSTRUCTOR OF MY SITE, I CAN'T COPY AND PASTE WROTE THE BROWSER SECURITY SETTINGS HOW TO NOT CHANGE THESE FOR ME TO COPY / PASTE?

    https://support.Mozilla.com/en-us/KB/granting+JavaScript+access+to+the+Clipboard

    This extension will help you implement the security policies for access to the Clipboard.

    Allow the extended Clipboard support:

    https://addons.Mozilla.org/en-us/Firefox/addon/852

  • How can I prevent the access denied message when you use the shutdown command?

    I use shutdown /m \\computername/s

    I have "Access denied (5)" as an answer.
    I am admin on all my computers. Same username and password on each of them.
    How can I get this shutdown command to work remotely, so I can't access every computer command prompt via Remote Desktop?
    How can I prevent the access denied message when you use the shutdown command?

    Hello

    I suggest you to report this issue in TechNet Forums for Windows 7 networks: http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/threads

    Thank you.

  • Select an exact size of the image to be copied when you use the "Marquee" tool

    How can I select an exact size of the image to be copied when you use the "marquee"?...

    I like to choose a section image of 14.00 x 12,00... When you use the marquee selection tool, you can not control the mouse to select exactly 14.00 12.00 x is always a little higher or lower at 14:00 or 12: 00 am...

    is there a way that you can easily select the exact size of 14,00 x 12,00?...

    Please advise...

    see you soon,

    Hi wong168,

    You can use the fixed size option and enter the size in the input fields using the unit of measure of your choice; That is to say in, px, cm etc.

    If you right click in the entry boxes there are the list of measured values.

  • Loop Finder crash after upgrading to El Capitan.  'Finder close unexpectedly when you use the plug-in finder' - the message really is in Norwegian, so it may be different for the English operating system.

    'Finder close unexpectedly when you use the plug-in finder' - the message really is in Norwegian, so it may be different for the English.  The e is a compatibility issue with dropbox or Google drive in El Capitan?  Those are the plug-ins only that I could find.  Thank you very much.

    Please launch the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    Step 1

    For this step, the title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    In the upper right corner of the Console window, there is a search box to filter. Enter the name of the application crashed or process. For example, if Safari has crashed, you would enter "Safari" (without the quotes).

    Each message in the journal begins with the date and time when it was entered. Select the messages since the time of the last fall, as appropriate. Copy to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost everything that is not relevant to solve a particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name, may appear in the log. Anonymize before posting.

    Step 2

    In the Console window, clear the search box, and then select

    DIAGNOSIS AND diagnostic USE information reports ▹ user

    (not diagnose them and use Messages) in the list of logs on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points downwards. You will see a list of reports of incidents. The name of each report begins with the name of the process and ends with ".crash". Select the most recent report on the process in question. The content of the report is displayed at right. Allows you to copy and paste to validate all of the content, text, not a screenshot.

    I know that the report is long, perhaps several hundred lines. Please report all this anyway. If the report is only a few lines, make sure that you have disabled the search box.

    If you don't see any report, but you know, he had an accident, you have chosen diagnostic and using the list of Log Messages. INFORMATION on the USE of DIAGNOSTIC AND choose instead.

    In the interest of privacy, I suggest that, before posting, you change the UUID ' anonymous, ' a long string of letters, numbers and dashes in the header of the report, if it is present (it cannot be). "

    Please do not post other types of diagnostic report - they are very long and rarely useful.

    When you post the journal excerpt or the accident report, you might see an error message on the web page: "you have included content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • When you use the NI-CAN Transmit sample receive the same Harbor; can a virtual CAN channel (RCA or 257) be used?

    I work for a company that produces and transforms electric parts. We strive to get in remission at nine of the ECU, experiences, Instrument clusters etc. I'm trying to learn how to use LabVIEW to write commands and read the data on the CAN bus. I have downloaded the NI-CAN driver. I am currently 'play' with the same reception Port.VI show in the basic frame of the finder example API folder OR. I am not able to send the number in the data to write the table that it be read by the ncReadNet Mult .vi. When I put the parameter to 'Pending entries reading' the ncGetAttr.vi returns a 0 to indicate that there are no frames to read. As a result, the Mult.vi ncReadNet does not run.

    I don't have any connected equipment, I use the virtual CAN channel CAN256. Is this the reason why I can't get data frames in my queue for the Mult.vi ncReadNet to read?

    When you use the NI-CAN Transmit sample receive the same Harbor; can a virtual CAN channel (RCA or 257) be used?

    CAN carry 256 and 257 are connected to eachother through software.  When you write about 256, you can read the data on 257 and vice versa.  I think the example you mention is a writing and reading on the same port, but what you want is to probably to make a copy of this VI, in order to run two at once, where it opens 256 and the other opens 257.  Then, when you write one that you will see on the other.  I think you might be able to use the test panel CAN too read an and use the example of the other.

  • Firefox does not open after the update. Cannot open the profile technical, even when you use the directory in cmd line path

    I'm using Firefox on a Windows 7 computer. Firefox does not open after the last update. I read the help articles and it seems that I need to create a new profile because my settings were probably corrupted. I'm unable to open the profile technical, even when you use the directory in cmd line path. I tried the following commands in the command line:

    Firefox Pei
    "C:\Program Files (x 86) \Mozilla" PEI

    Nothing happens with every order.

    I am also running Norton Internet Security. I read a help of virtual navigation features Re article that can cause a problem. The article says to check the setting of virtualization in the internet security software and to clear the virtual cache. I went through all the menus of settings in Norton Internet Security version 21.6.0.32 and I don't see anything that looked like in "virtualization" settings, so I guess that does not apply to me. "

    If you have any ideas, I had appreaciate that your expertise!

    Hello arcandl, at the launch of the firefox is not after you double-click the shortcut, it is sometimes also a sign of active malware on a system.
    you might want to try running a scan with some various other security like the free version of malwarebytes and adwcleaner tools that are specialized to remove the adware and browser hijackers.

    Fix Firefox problems caused by malicious software

Maybe you are looking for