How to avoid this in SQL Plus

Hi All,
I am creting a Stored Procedure and when i run this sentence the SQL Plus requests my the value of the variable 'lolo' and the i want to compile the Procedure, without giving that value.
1 create procedure hh
2 as
3 begin
4 DBMS_OUTPUT.PUT_LINE('&lolo');
5* end;
SQL> /
Enter value for jhsdfsd: df
old 4: DBMS_OUTPUT.PUT_LINE('hshfdhs&jhsdfsd');
new 4: DBMS_OUTPUT.PUT_LINE('hshfdhsdf');
Nelson Soler

Although V's solution (V, nice to see you back by the way), will allow you to compile the proc with the ampersand character, I suspect that the stored proc will not do what you expect.
If you are expecting it to prompt for a value of lolo when you run it, it won't.
SQL> SET DEFINE ^
SQL> CREATE PROCEDURE hh AS
  2  BEGIN
  3     DBMS_OUTPUT.Put_Line('&lolo');
  4  END;
  5  /
Procedure created.
SQL> SET SERVEROUTPUT ON
SQL> exec hh
&lolo
PL/SQL procedure successfully completed.You cannot prompt for values in PL/SQL.
TTFN
John

Similar Messages

  • My macbook keeps asking me to use an administrator and their password to continue but nobody seems to know who is the administrator for this computer...does anyone know how to avoid this this or figure out who the administrator is?

    My macbook keeps asking me to use an administrator and their password to continue but nobody seems to know who is the administrator for this computer...does anyone know how to avoid this this or figure out who the administrator is?

    Lynne130,
    to figure out which users have administrative privileges, open the Users & Groups pane of System Preferences; each user other than the Guest User will be shown with a description of either “Admin” or “Standard”. It’s typical for the first user created on a Mac to be an administrative user.

  • Why do all the programs open when the mini is turned on, and how to avoid this?

    why do all the programs open when the mini is turned on, and how to avoid this?

    Open System Preferences > Users & Groups then select the Login Items tab.
    Remove all apps listed there.
    And check /Library/StartupItems
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    /Library/StartupItems
    Click Go then move all items from the StartupItems folder to the Trash.

  • After adding MIME type in sharepoint server, file click opens a popup for file to open as readonly or edit, How to avoid this popup

    After adding MIME type in sharepoint server,
    File click opens a popup for file to open as readonly or edit, How to avoid this popup
    Popup Details:
    You are about to open --> File Details
    How would you like to open --> ReadOnly, Edit
    OS: Window 7
    Jagadish

    this is likely caused by the library requiring check-out/check-in. For a file to be editable, the file needs to be checked out.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • After writing into serial port, the same message gets bounced back into the Inqueue also. If anyone know how to avoid this, please rpely.

    Hi,
    After writing into serial port, the same message gets bounced back into the Inqueue also. If anyone know how to avoid this, please reply.
    Thanks,
    Ganesh

    If you disconnect the cable going to the serial device, do you still get the echo? If so you have something going on in the port setup. If disconnecting the cable stops the echo then the device you're talking to is doing it - which would be my bet. One thing to check is whether this might not be normal operation. I have seen devices that if a command was successful, it simply echo'd back the command string you had sent. Also many serial devices have setting for specifying whether they are to echo commands.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Hi. My Ipad2 is being reseted each 1 minut of use and then I found this description "resetcounter(date and time).plist". Someone knows what this means and how to avoid this? Many, many thanks. iPad 2

    Hi. My Ipad2 is being reseted each 1 minute of use and then I found this description "resetcounter(date and time).plist". Someone knows what this means and how to avoid this? Many, many thanks.
    iPad 2

    Try resetting your device by holding down both the home and lock buttons for ~10 seconds or until the device restarts, ignoring the power slider. 

  • How to avoid this?

    Hi
    i'm calling reprots from the forms.My problem is we are calling 3 reports at a time i,e one after the other, this will works fine in report 5 for screen but in 10g this will overlap all the output to a single pdf file (here i'm using cache)so that i'm getting only the third file.
    how to avoid this? so that i can have 3 diffrent pdf files or one after the other if first close second open,second close third open.
    please help me,
    thanks and regards
    vishwa

    IF :BLK_MAIN.CKB_REP7 = 1 THEN
    report_id:=FIND_REPORT_OBJECT('Mast03');
    RUN_REPORT_OBJECT_PROC(report_id,
    SERVER_NAME,
    'pdf',
    CACHE,
    'Mast03',
    'paramform=no PDFCOMP=0 EXPIRATION=120 desformat=pdf P_COMP_CODE='||:GLOBAL.G_COMP_CODE||' '||
    'P_UNIT_CODE='||:GLOBAL.G_UNIT_CODE||' '||'P_TRUST_CODE='||:GLOBAL.G_TRUST_CODE,
    IP_ADDRESS);
    END IF;
    IF :BLK_MAIN.CKB_REP6 = 1 THEN
    report_id:=FIND_REPORT_OBJECT('Mast05');
    RUN_REPORT_OBJECT_PROC(report_id,
    SERVER_NAME,
    'pdf',
    CACHE,
    'Mast05',
    'paramform=no PDFCOMP=0 EXPIRATION=120 desformat=pdf P_COMP_CODE='||:GLOBAL.G_COMP_CODE||' '||
    'P_UNIT_CODE='||:GLOBAL.G_UNIT_CODE||' '||'P_TRUST_CODE='||:GLOBAL.G_TRUST_CODE,
    IP_ADDRESS);
    END IF;
    IF :BLK_MAIN.CKB_REP1 = 1 THEN
    report_id:=FIND_REPORT_OBJECT('Mast04');
    RUN_REPORT_OBJECT_PROC(report_id,
    SERVER_NAME,
    'pdf',
    CACHE,
    'Mast04',
    'paramform=no PDFCOMP=0 EXPIRATION=120 desformat=pdf P_COMP_CODE='||:GLOBAL.G_COMP_CODE||' '||
    'P_UNIT_CODE='||:GLOBAL.G_UNIT_CODE||' '||'P_TRUST_CODE='||:GLOBAL.G_TRUST_CODE,
    IP_ADDRESS);
    END IF;
    In the above code,3 check box are like :BLK_MAIN.CKB_REP7,:BLK_MAIN.CKB_REP6,:BLK_MAIN.CKB_REP1 which end user selects(he can choose any one or all three).If select all 3 the report masto4 only comes,mast05,mast03 also
    comes but those pdf's are overlaped from the report mast05.
    But in the earlier version of forms and reports, if close the first report then second will come and like that.

  • How i avoid this window and directly fetched date

    hi master
    sir i have three options button when i select anyone then my query change and fatch new data
    but before fetching data system show new windows with this message
    Do you want to save the changes you have made ?
    with yes / no /cancel button
    sir how i avoid this window and directly fetched date
    or how bypass this message
    please give me idea

    bro, when u execute the query to fetch records it tries to validate the form and pops an alert message. if u want to avoid it do this
    change : execute_query;
    to: execute_query(no_validate);
    now it wont ask for validation of the previous records present on the form, but make sure such actions are not not a threat to data integrity.
    zaibi.

  • How to avoid this no read acess in EPC

    hi to all experts.
    im getting this error in Extended Program Check how to avoid this error .
    No read access to field string SWIFT

    Hi,
    Field swift was not read in program, which means field swift was not used in program.If swift was necessary use it with read access.
    Hope this helps you
    Regards,
    Rajani

  • Why Memory Manager .cpp Error.How to avoid this

    I am getting getting the attached error when developing labview program.
    Why this error is coming?
    How to avoid this?
    Attached the error screen shot
    Attachments:
    MemoryCppError.png ‏33 KB

    Hi Selvan,
    we don't know your VI, thus we don't know the cause…
    Practical advice: save often, save early!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Pluggin container makes flash player crash. all is up to date. How to avoid this?

    Question
    pluggin container makes flash player crash. all is up to date. How to avoid this?

    First, download and run the Flash uninstaller: [http://kb2.adobe.com/cps/141/tn_14157.html http://kb2.adobe.com/cps/141/tn_14157.html] . You probably want the 64-bit version. After that has run, restart your computer, and then let's download a fresh version of Flash. Try downloading and installing it from [http://fpdownload.macromedia.com/pub/flashplayer/current/licensing/win/install_flash_player_11_plugin_32bit.exe here].
    Once you have flash installed again, start Firefox up, and see if you are getting any errors. If it works, awesome, if not, let's move on.
    Start Firefox up in [[Safe Mode|Safe Mode ]] (don't select any of the checkboxes that appear). If Flash works here, then it is one of your addons which is causing a problem.
    If we are still having a problem, try [[Updating your graphics driver|Updating your graphics driver]] .
    If none of these work, read [[Troubleshooting plugins|Troubleshooting plugins]] and let me know!

  • How to copy procedure to sql plus window.

    I am trying to copy my procedure from note pad to sql plus window and some of the texts are being cut off. How can I copy the entire procedure to sql plus window.
    thanks

    Thank you guys this is what is happning.
    1  CREATE OR REPLACE PROCEDURE  ITEMCUSTOMPAGING(
    2        p_desc in itemlist.idescr%type,
    3        p_letting in bidlet.datelet%type,
    4        p_letting1 in bidlet.datelet%type,  
    5       p_sort in  NUMBER ,
    6       p_order in VARCHAR ,
    7        i_results    out sys_refcursor
    8     )
    9     AS
    10     BEGIN
    11        OPEN  i_results  FOR
    12         SELECT g.csecnum , e.iplineno , substr(e.eiitem ,1,4)||'.'||substr(e.eiitem ,5,9) ItemNum,
    13         INITCAP(i.idescr ||'  '|| e.isupdes)  Descrip,INITCAP(i.idescrl ||'  '|| e.isupdes)  Descrip
    14         DECODE (TRIM (p.prroute), NULL, 'N/A',p.prroute) Route,b.datelet  ,trim(to_char(b.datelet ,'
    15        FROM itemlist i, estitem e, estcatg g, propproj x, proposal p, bidlet b, letprop l
    16        WHERE    p.contid = x.contid AND x.pcn = g.pcn AND e.pcn = g.pcn AND e.cn = g.cn AND i.item =
    17        AND i.ispecyr = p.cspecyr AND e.iplineno <> ' ' AND e.eiitem <> '2550601/01000'
    18        AND e.eiitem <> '2565601/00031' AND e.eiitem <> '2565601/00032' AND e.eiitem <> '2565601/0003
    19        AND e.eiitem <> '2402601/01000'
    20        AND (i.idescr  like  TRIM(UPPER(p_desc))||'%'  or  i.idescrl  like  TRIM( UPPER(p_desc))||'%'
    21        AND b.datelet  between  p_letting  and p_letting1
    22        AND p.contid = l.lcontid
    23        AND l.letting = b.letting
    24        AND SUBSTR (l.lcontid, 4, 4) <= '5'
    25        GROUP BY g.csecnum,i.idescr,b.datelet,i.iunits,p.clocat1,p.clocat2,p.contid,p.cdescr, p.cproj
    26        ORDER BY p_sort   p_order;
    27* End;
    QL> /
    arning: Procedure created with compilation errors.
    QL> SHOW ERR
    rrors for PROCEDURE ITEMCUSTOMPAGING:
    INE/COL ERROR
    2/8     PL/SQL: SQL Statement ignored
    6/25    PL/SQL: ORA-00933: SQL command not properly ended
    QL>

  • How to change prompt in sql plus

    i have seen a user. he has changed SQL-PLUS promp
    e.g SQL> to usermech>
    how can i change this.

    use this -
    set sqlprompt little_expertRegards.
    Satyaki De.

  • How to avoid unions in sql quries

    Hi All,
    I have an sql statement in which I am using unions to get the data from two tables with different conditions. how can avoid UNIONs in  my query, which will increase performance. please suggest.
    SQL Query is :
    SELECT opt_url_path, locale
         FROM urlregistry
        WHERE master_assetid IN
                 (SELECT c.id FROM content_c c, content_cd cc
                   WHERE c.flextemplateid = cc.id AND cc.name = 'SoftwareDownload'
                         AND (c.PATH NOT LIKE '/auth%' AND c.PATH NOT LIKE '/gate%'))     
    UNION
    SELECT opt_url_path, locale
         FROM urlregistry
        WHERE master_assetid IN
                 (SELECT c.id FROM content_c c, content_c_mungo cm
                   WHERE c.id = cm.cs_ownerid AND cm.cs_attrid =
                   (SELECT id FROM attribute WHERE name = 'Gated')
                     AND c.flextemplateid IN (SELECT id FROM content_cd WHERE name = 'Collateral')
                         AND cm.stringvalue = 'Yes'
                         AND (c.PATH NOT LIKE '/auth%'
                              AND c.PATH NOT LIKE '/gate%'))                              
    UNION
    SELECT PATH, locale
         FROM bloburlregistry
        WHERE master_assetid IN
                 (SELECT c.id FROM content_c c, content_c_mungo cm
                   WHERE c.id = cm.cs_ownerid AND cm.cs_attrid = (SELECT id FROM attribute WHERE name = 'Gated')
                         AND c.flextemplateid IN (SELECT id FROM content_cd WHERE name = 'Collateral')
                         AND cm.stringvalue = 'Yes'
                         AND (c.PATH NOT LIKE '/auth%'
                              AND c.PATH NOT LIKE '/gate%'))
    Thank u.

    To increase performance you need to reduce the I/O. So when ever i tune a SQL the first thing i look for is that. If i have a table used multiple times i try to remove it and solve the required problem by just scanning the table once. But do to that we need to have good understanding of the data and there relation between tables. But we don't know anything about yours. Said that i came up with this.
    select opt_url_path
         , locale
      from urlregistry
    where master_assetid
          IN
              select c.id
                from content_c c
                left
                join content_cd cc
                  on c.flextemplateid = cc.id
                 and (cc.name = 'SoftwareDownload' or cc.name = 'Collateral')
                left
                join content_c_mungo cm
                  on c.id = cm.cs_ownerid
                 and cm.cs_attrid =
                         SELECT id
                           FROM attribute
                          WHERE name = 'Gated'
                 and cm.stringvalue = 'Yes'
               where c.PATH NOT LIKE '/auth%'
                 and c.PATH NOT LIKE '/gate%'
                 and (
                        cc.flextemplateid is not null or
                        cm.cs_owner_id    is not null
    union
    select PATH
         , locale
      from bloburlregistry
    where master_assetid IN
              select c.id
                from content_c c
                   , content_c_mungo cm
               where c.id = cm.cs_ownerid
                 and cm.cs_attrid =
                         SELECT id
                           FROM attribute
                          WHERE name = 'Gated'
                 and c.flextemplateid IN
                         SELECT id
                           FROM content_cd
                          WHERE name = 'Collateral'
                 and cm.stringvalue = 'Yes'
                 and c.PATH NOT LIKE '/auth%'
                 and c.PATH NOT LIKE '/gate%'
    This is a untested code. You can give this a try and see if it gives the expected output and also if the performance improves.

  • How do i access the SQL*plus

    hello, i am having problems accessing my SQL*plus: its asking for a login name, password and some host string what is this? someone please help
    thank you
    A.

    I have only begun to learn database related fields. I have downloaded the iSQL*Plus (from this Oracle site), but am unable to use it due to complications in installing this product. How does one access the Oracle server? I trying to access it via my home PC (w/ windows98). Do I need to purchase additional software on my own? if so which one? How would any of you suggest I go about learning the PL/SQL (on my own as classes won't fit in schedule) ? Appreciate your help.

Maybe you are looking for

  • Is there a way to uninstall fire fox 4 and go back to the old one the new home page is awful

    I upgraded to 4 but it's the dumbest thing ever can I change back?

  • Doesn't Display Properly In Dreamweaver

    Hi, I just opened a website in Dreamweaver CS3 that was originally created in Expression Web. If I preview a page in a browser it looks fine, but in the Dreamweaver design editing window it looks a mess. The bar across the top is fine, but the left n

  • Firefox will not open in regular or safe mode?

    I am unable to open Firefox regular or safe mode. Last night it began to update on its' own and crashed. I immediately tried to open Firefox but was unable to do so. Now after rebooting numerous times, I still can't open it. No parts of FF are runnin

  • Derivation through "Move" in COPA

    Hi Experts Iam trying to derive relationships to avoid "unassigned data" in COPA. I have derivation between customer and salesman, sales office but this is not automatic, at the time of customer creation, the derivation rule has to be maintained in t

  • Creating OCI in Webdynpro ABAP

    Hi Friends, We are planning use OCI external catalog for adding items to the shopping cart. I am creating WDA application which will act as the external catalog. In my application I am able to read the Hook_url and other parameters of the OCI configu