How to use the referential cursor in this context

Hello everyone I want to create a procedure and I am able to create it, but it does not work as I want it to be
Please suggest the best way.
CREATE OR REPLACE PROCEDURE UPDATE_COMMAND(V_TABLE_NAME VARCHAR2, V_COLUMN_NAME VARCHAR2)
AS

V_SQL CLOB;
V_SQL_1 CLOB;
TYPE V_SQL_2 IS REF CURSOR;
V_SQL_22 V_SQL_2;
V_SQL_23 VARCHAR2(2000);
A clob;

BEGIN

V_SQL :='UPDATE '||V_TABLE_NAME ||'SET '||V_COLUMN_NAME ||' = ';

V_SQL_23 := 'SELECT'|| V_COLUMN_NAME|| ' FROM ' ||V_TABLE_NAME;

OPEN V_SQL_22 FOR V_SQL_23;

loop
   FETCH V_SQL_22 INTO A;
 
  V_SQL_1 :=V_SQL | |V_COLUMN_NAME;

   dbms_output.put_line(v_sql_1);
   END LOOP;
   
   CLOSE V_SQL_22;
   
   END;
first of all I don't know how to refer to this v_coluimn_name which I use just after the fetch command.

When I run the procedure it gives error

ORA-06550: line 1, column 22:
PLS-00357: Table, view or reference sequence "QM_PRODUCT" not allowed in this context
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Prost wrote:
I want the update command to be stored in a clob variable so that I can insert this variable in a column of a fictitious table, and then I'll get update of this table scripts manually.

Well, what I gave just you out individual lines, so just adapt it to concatenate these lines in a CLOB variable for the loop process and then store you CLOB when finished. You should be able to handle that yourself.

Still don't know why you want to do it right. Looks like a bad way to do something.

Tags: Database

Similar Questions

  • How to use the graphic cursor 3D of labview 2010

    Hi all

    I use for my 3D graphics application. I have inserted the cursor inside but cannot able to move.

    Please give me suggestions and solution for the same.

    Thank you & best regards

    Hi all

    I found my mistake. In fact cursor may move in particular co-ordiante that feed us to him.

  • LJ m1120MFP and MacOS 10.7.3 - How to use the scanner? Is this possible?

    Scanner is not located in the system. Printer works fine. The driver version is 1.3.0.261

    Just to add, the product indeed no longer scan while using Lion, you will find also listed by the document of support for HP below:

    http://h20000.www2.HP.com/bizsupport/TechSupport/document.jsp?&objectID=c02925114#A2

    To work around the problem, try checking any 3rd party scanning solution like Vuescan, that support the scanner.

    It will be useful,

    Shlomi

  • How to use the acronym

    How to use the acronym instead of this?

    Please explain

  • How to use the scan on a 4215i function all in one printer

    How to use the function scan with this printer with windows 8. I did the installation but the scan function is not wwork

    You have the printer Officejet 4215 all-in-one?

    If so, then there is no complete features in the printer driver.  The printer is using the Windows printer drivers Update menu.  For more information on using the driver from Windows Update, click here.

    You have this printer connected via USB?  If so, then there is workaround methods to get the printer to scan, as the old software package is not available on Windows 8.  In the above linked document, scroll down to the section on how to scan with updated driver for information about how to perform these types of scans.  I hope this helps.

  • How to use the date with the report parameter format

    Hi all

    How to use the date format with this tag function,

    <? param@begin:P_FROM_DATE? > <? $P_FROM_DATE? >

    This date of form source of report and setting is coming as this 2012/11/01 00:00:00.

    So now I need this in MY-DD-YYYY marker. I tried like this..? param@begin:P_FROM_DATE? > <? $format - date: P_FROM_DATE; ' DD-MON-YYYY '? >

    but its giving error. Can someone pls how to convert to the format of date custom.

    Thanks and greetings
    Srikkanth.M

    Problem solved.

    REF this link

    Date Format of XML

  • Can I use the Windows Media player this Adobe pirate intead? How, please? E-mail address is removed from the privacy *.

    Adobe Flash Player prevents me to display videos because I don't want to share my personal computer storage.

    Wholesale! constitutional question here! Can I use the Windows Media player this Adobe pirate intead? How, please? Or any other way to overcome this in-your-face PEST hijacker - Adobe Flash? * E-mail address is removed from the privacy *

    Hello

    Flash Player and Windows Media Player are not interchangeable.

    Like many things on the web, the Flash Player local storage can be put to bad use. This does not necessarily mean the Flash Player without scruples or bad product - it's the sites Web/people who abuse of this (depending on your point of view).

    You can configure Flash Player to block local storage on your computer. This does not necessarily all the features of Flash Player - for example with my set of Flash Player to block local storage I can still see videos on YouTube.

    The controls for the Flash Player local storage can be found here: *

    Start-> Control Panel-> Flash Player (32-bit) (Tab instorage )

    There is a good explanation of privacy and local storage of Flash Player here:

    http://help.adobe.com/en_US/FlashPlayer/LSM/WS6aa5ec234ff3f285139dc56112e3786b68c-7fff.html#WS6aa5ec234ff3f285139dc56112e3786b68c-7ffa .

    I hope this helps.

    * You have not stated your version of Windows, so it's Windows 7.

  • Is there an online class to learn exactly how to use the command prompt which is quite through. OR y at - it clear a book that explains in detail for this? Who should I contact?

    I would like to know how to use the command prompt.  The nethodology type in the cmd prompt with the syntax and the Liposuction, in other words, the real return to a command prompt. I downloaded about evertthing I can find about this, but can't seem to put it all.

    My OS is Windows XP Pro sp3, lots of RAM, my address is * address email is removed from the privacy *.   I would like to take a rough online study if one is available if it is not too expensive.

    It really depends on what you mean by "to a command prompt."

    If you open a command prompt window (for example, in start > run > cmd > OK), you can enter a number of orders.  The list of available commands, including their syntax, is here--> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

    You can also follow the links here:http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_o.mspx

    If you want to get more sophisticated - automating command-line tasks - you can start here: http://technet.microsoft.com/en-us/scriptcenter/default.aspx

  • After using popScreen() than pushScreen(), how to remove the fields present in this first screen.

    I have two screens, first_one contains 17 fields & by a button_presnt in the first screen, I'm reaching to the second screen, on the second screen after pop_screen (first) & push_screen (first) I get my first screen, now I want to remove 15 fields, but I face the error, this illegal argument exception, or "Try to delete a field that is not the Manager"... & Note this point I got the get_field_count from the first screen.
    Try

    {

    UiApplication.getUiApplication () .popScreen (object_to_supprot);
    UiApplication.getUiApplication () .pushScreen (object_to_supprot);
    }
    catch (Exception err)
    {
    Dialog.Inform ("page load error:" + err);
    }

    Try
    {
    Dialog.Inform ("field homepage County:"+ object_to_supprot.getFieldCount () ');

    int k = object_to_supprot.getFieldCount () - 1;

    While (k > 1)
    {
    Delete (object_to_supprot.getField (k));
    k-- ;
    }
    }
    catch (Exception err)

    {

    Dialog.Inform ("error in the setting of the key work:" + err);

    }

    I disagree with Simon here.  I think that the deletion of fields of a screen is a valid thing to do.  I can see the case when you are using the same screen, but have two different sets of data that require slightly different fields on the screen.  This is what seems to be the case here.

    I just realized what is the problem.

    your code:

    Delete (object_to_supprot.getField (k));

    must be:

    object_to_supprot. Delete (object_to_supprot.getField (k));

    Your current code is actually:

    This.Delete (object_to_supprot.getField (k));

    and 'this' is probably your second screen.  You want to remove fields from your first screen.

    Can I ask you to review my first post and Simon post, once again.  If please review how to use the battery in the display and make sure that you use it properly.

  • How to use the software keyboard Toshiba 50L9450VE TV?

    I just bought a LED TV model 50L9450VE. When installing, I need to enter the password for the wifi network. The remote doesn't have a keyboard of the letter, and the TV shows a soft keyboard to enter the password. How to use the software keyboard? I can't figure out how to get the cursor in it; the manual does not say, and I can't find the information online. Thank you.

    Hershel

    Suppose you are from Israel? Although this model is not made for the EU market, but probably for the Asian market, it looks like the European L93 series.
    You will find how to operate the software keyboard (page 52): http://www.toshiba-om.net/pdf/manual...h-Specific.pdf

  • With no headphone jack, how to use the iPhone in my car 7

    Okay, so here's the challenge.  I have a power source and a headphone and not Bluetooth.  It works perfectly with iPhones before 7.  But with 7, it isn't possible to use the same configuration I had for years.  I own my car, and I have no interest in buying a new car just to support a new phone.  And since this will be a problem for the years to come if I stay with Apple, I would like to know what are the solutions are available.

    So, how to use the new iPhone 7 while remaining responsible and using my car speakers?  Dongles Bluetooth that I need to reload, it's probably not.

    Thus, looking for ideas that might have people.  I can't be the only one with this concern.

    It's almost a certainty that a third party adapter will appear quickly. The new Macbook has a single port usb - c and people asked the same question, 'how to load and use USB at the same time." There are today dozens of solutions for the Macbook, and then it will be with the iPhone 7. An adapter with a 3.5 mm jack and a port of loading Lightening would be my guess. Kickstarter entrepreneurs are probably already working on it.

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to use the utility disk first aid for hard drive internal el captian

    How to use the utility disk first aid for hard drive internal el captian

    Select the drive and click first aid.

    If something is not repairable because this is the system drive, then you need to start using the recovery partition and run disk utility it.

  • How to use the Print Screen function?

    I've seen various descriptions of how to use the print screen function.

    It would be nice to actually tell one that works.  None have worked for me.

    [Fn] and Prt SCr does not work.

    CTRL and Prt SCr does not work.

    CTRL, Alt, and Prt SCr does not work.

    [Fn], Ctrl and Prt SCr does not work.

    If anyone knows the correct method to activate the screen capture function which would be a good thing.

    From the looks of things, HP has a big problem with this function.

    Here's a microsoft articleon the use of the screenshot function.

    This should answer your questions.

    Thanks for taking a peek.

  • How to use the adapter from the wall with my Mac Pro laptop?

    How to use the adapter from the wall with my Mac Pro laptop?

    The AC wall connector is not compatible with the outlet on the MBP?  As the MBP charger will work from 100v to 240v, a transformer is necessary.  You need a converter that connects to the power outlet home and is compatible with your MBP.  You can buy the Apple travel kit:

    http://www.Apple.com/shop/product/MD837AM/A/Apple-world-travel-adapter-Kit

    Or you can use a single specific converter for the geographical area:

    http://www.Amazon.com/orei-grounded-universal-adapter-Singapore/DP/B004SCSV2U/re f = sr_1_4? ie = UTF8 & qid = 1460735377 & sr = 8-4 & keywords = us + in + uk + power + adapter

    (it is a UK USA example)

    Or you can get the converter that adapts the charger directly:

    http://www.Amazon.com/HIOTECH%C2%AE-extension-charger-connecting-specification/d p/B00MA48JZW/ref = sr_1_3? ie = UTF8 & qid = 1460735486 & sr = 8-3 & keywords = us + in + uk + power + ad aptor + apple + charger + cord

    (again, this is for a UK plug.)

    Ciao.

Maybe you are looking for