Accepting user input and executing a PL/SQL block using it

Hi All,
I am working on a requirement wherein I have to accept values from the user for the various arguments to be supplied to a PL/SQL block and then execute it using these values. For now, I am using the following logic:
PROMPT Enter value for the Category
ACCEPT cCategory CHAR PROMPT 'Category:'
DECLARE
cCategry CHAR(1) := '&cCategory';
BEGIN
DBMS_OUTPUT.PUT_LINE('The value of the Category as entered by you is' || cCategory);
END;
PROMPT Press y if you want to proceed with the current values, or press n if you want to re-enter the values
ACCEPT cChoice CHAR Prompt 'Enter y or n:'
DECLARE
cCategry CHAR(1) := '&cCategory';
sErrorCd VARCHAR2(256);
sErrorDsc VARCHAR2(256);
BEGIN
IF '&cChoice' = 'y'
THEN
DBMS_OUTPUT.PUT_LINE('Starting with the process to execute the stored proc');
--- schema1.package1.sp1(cCategry, sErrorCd, sErrorDsc);
--- DBMS_OUTPUT.PUT_LINE('Error Code :' || sErrorCd);
--- DBMS_OUTPUT.PUT_LINE(' Error Description :' || sErrorDsc);
ELSIF '&cChoice' = 'n'
THEN
Now I want that the proc again start executing in the loop from the 1st line i.e. PROMPT Enter value for the Category. However i see that this is not possible to do that PROMPT statements and accepting user inputs execute only on the SQL prompt and not inside a PL/SQL block.
Is there an alternate method to establish this?
Thanks in advance.

Hi,
You can write a genric procedure to achive the desired output. Pass 'Y' or 'N' in the procedure.
Call that procedure in simple pl/sql block during runtime using substituton operator.
For ex
create or replace procedure p1(category_in in varchar2)
IS
BEGIN
if (category_in='Y')
then
prcdr1()
/** Write your logic here ***/
elsif(category_in='N') then
prcdr2()
/** write your logic here***/
end if;
exception
/***write the exception logic ***/
end p1;
Begin
p1('&cat');
end;Regards,
Achyut K
Edited by: Achyut K on Aug 6, 2010 5:20 AM

Similar Messages

  • Executing a PL/SQL block (using Toplink)

    I have a scenario where I need to execute some fairly complex PL/SQL blocks. As a tester, I am attempting to execute the following simple block:
    declare val NUMBER := 1; begin val := 2; end;
    Both wrapping this in an SQLCall, or a DataReadQuery give the following exception. What is the best way to execute a PL/SQL block using Toplink?
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00900: invalid SQL statement
    Error Code: 900
    Call: declare val NUMBER := 1; begin val := 2; end;
    Query:DataReadQuery()
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:570)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:453)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelect(DatasourceCallQueryMechanism.java:156)
         at oracle.toplink.queryframework.DataReadQuery.executeNonCursor(DataReadQuery.java:118)
         at oracle.toplink.queryframework.DataReadQuery.executeDatabaseQuery(DataReadQuery.java:110)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)
         at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:96)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2062)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)

    Could you try the following:
            Session s = ...
            DataModifyQuery dmq = new DataModifyQuery();
            SQLCall sqlCall = new SQLCall();
            sqlCall.setQueryString(
                "declare\n" +
                "  val NUMBER := 1;\n" +
                "begin\n" +
                "  val := 2;\n" +
                "end;");
            sqlCall.setQuery(dmq);
            dmq.setCall(sqlCall);
            s.executeQuery(dmq);

  • Accepting user input and then running grant statements

    Hi I have a script which creates a database, at the end of this script I need to change user, and then run a number of grants. I need to accept the name of the schema to make the grants to from the user. The code I have been trying to use is below
    --Prompt for portal password and connect as portal
    connect portal
    --Issue grants for portal apis
    PROMPT 'Enter the schema name'
    ACCEPT schema
    @provsyns.sql &schema
    PROMPT 'Enter the schema name'
    ACCEPT schema
    grant select on WWSEC_PERSON to &&schema;
    PAUSE
    grant select on WWSEC_GROUP$ to &&schema;
    PAUSE
    grant execute on wwctx_api_private to &&schema;
    grant execute on pkg_oid to &&schema;
    grant execute on pkg_error_handling to &&schema;
    UNDEFINE schema
    When I run the code I get and ORA-00987: missing or invalid username(s)
    Can anyone help me please?
    Many thanks,
    Danny

    Hi,
    You can write a genric procedure to achive the desired output. Pass 'Y' or 'N' in the procedure.
    Call that procedure in simple pl/sql block during runtime using substituton operator.
    For ex
    create or replace procedure p1(category_in in varchar2)
    IS
    BEGIN
    if (category_in='Y')
    then
    prcdr1()
    /** Write your logic here ***/
    elsif(category_in='N') then
    prcdr2()
    /** write your logic here***/
    end if;
    exception
    /***write the exception logic ***/
    end p1;
    Begin
    p1('&cat');
    end;Regards,
    Achyut K
    Edited by: Achyut K on Aug 6, 2010 5:20 AM

  • URGENT!.....accepting user input and string conversion

    I have a problem with a text-based menu I am trying to create for a Shape class with rectangle, circle, etc... subclasses below it...here is a code clip
    //The menu choices given to the user.
              System.out.println("Please select which shape you would like to create:\n");
              System.out.println("(1)Rectangle");
              System.out.println("(2)Square");
              System.out.println("(3)Circle");
              System.out.println("(4)Ellipse");
              System.out.println("(5)Exit the program\n");
              System.out.print("Enter your choice (1,2,3,4 or 5): ");
         menuChoice=(char)System.in.read();
    switch(menuChoice) {
    case '1':                              
    System.out.println("\nTo create a rectangle, please enter the following dimensions below (integers only)...\n");                    
         System.out.print("Center X co-ordinate = ");
              while((x=(char)System.in.read()) !='\n')
              CentXBuf.append(x);     
         System.out.print("Center Y co-ordinate = ");
              while((y=(char)System.in.read()) !='\n')
              CentYBuf.append(y);
    The above works fine, however, when the the user inputs the menu choice, it does not let me input the center x co-ordinate and goes on to the second input of the center y co-ordinate then the program crashes with a NumberFormatException
    I tried to replace
         menuChoice=(char)System.in.read();
    with
         while((z=(char)System.in.read()) !='\n'){
              zBuff.append(z);
         String v = new String(zBuff);
         int menuChoice = Integer.valueOf(v).intValue();
    but the above itself gives me a NumberFormatException also!
    What do I do?!?!

    Try this:
    BufferedReader reader = new BufferedReader(
    new InputStreamReader(System.in)
    String input = reader.readLine();

  • SQL LOGIC - How to accept USER input and use that data in SQL Logic?

    Hello Experts
    Can anyone of you please explain in detail how to acheive the above task am a begginner, it would be great help for me.
    Thanks in Advance.

    Hi,
    You mean to say, you need to use inputs from Data manager Prompts in your Script Logic.
    From Help File
    You can use the EvDTSModifyPkg task to dynamically pass a text string to logic in Data Manager.  For example, a user who wishes to dynamically pass a text string representing a year (which is a portion of the *XDIM_MEMBERSET instruction) could use the following steps:
    Using the EvDTSModifyPkg task, prompt for the year, i.e., PROMPT(TEXT,%TEXT%,"select a year")
    Pass the returned %TEXT% to the FormulaScript of the RunLogic task as follows: TASK(RUNLOGIC,FORMULASCRIPT,"*FUNCTION MYYEAR=%TEXT%u201D)
    In the Data Manager logic, use the dynamically created function as follows: *XDIM_MEMBERSET TIME=MYYEAR.INPUT.
    The logic name in the RunLogic task must be specified with the .LGF extension to enforce its validation at run time.
    BPC NW 2.0 Version Works differently.
    Hope this Helps,
    Kranthi

  • How to accept user inputs from  sql script

    I want to create Tablespace useing sql script , but the location of the data file I need accept from user . (to get the location of the data file ) .
    How can I accept user input from pl/sql .
    Example :
      CREATE TABLESPACE  TSPACE_INDIA LOGGING
         DATAFILE 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf'
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
         EXTENT MANAGEMENT LOCAL;here I need to accept location of the datafile from user ie : 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf'

    Hi,
    Whenenever you write dynamic SQL, put the SQL text into a variable. During development, display the variable instead of executing it. If it looks okay, then you can try executing it in addition to displaying it. When you're finished testing, then you can comment out or delete the display.
    For example:
    SET     SERVEROUTPUT     ON
    DECLARE
        flocation     VARCHAR2 (300);
        sql_txt     VARCHAR2 (1000);
    BEGIN
        SELECT  '&Enter_The_Path'
        INTO    flocation
        FROM    dual;
        sql_txt :=  'CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
         DATAFILE' || flocation || ' "\SRC_TSPACE_INDI_D1_01.dbf" ' || '
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
         EXTENT MANAGEMENT LOCAL ';
        dbms_output.put_line (sql_txt || ' = sql_txt');
    --  EXECUTE IMMEDIATE sql_txt;
    END;
    /When you run it, you'll see something like this:
    Enter value for enter_the_path: c:\d\fubar
    old   5:     SELECT  '&Enter_The_Path'
    new   5:     SELECT  'c:\d\fubar'
    CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
         DATAFILEc:\d\fubar
    "\SRC_TSPACE_INDI_D1_01.dbf"
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE
    UNLIMITED
         EXTENT MANAGEMENT LOCAL  = sql_txt
    PL/SQL procedure successfully completed.This makes it easy to see that you're missing a space after the keyword DATAFILE. There are other errrors, too. For example, the path name has to be inside the quotes with the file name, without a line-feed between them, and the quotes should be single-quotes, not double-quotes.
    Is there some reason why you're using PL/SQL? In SQL, you can just say:
    CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
    DATAFILE  '&Enter_The_Path\SRC_TSPACE_INDI_D1_01.dbf'
    SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL;though I would use an ACCEPT command to given a better prompt.
    Given that you want to use PL/SQL, you could assign the value above to sql_txt. If you need a separate PL/SQL variable for flocation, then you can assign it without using dual, for example:
    DECLARE
        flocation     VARCHAR2 (300)     := '&Enter_The_Path';The dual table isn't needed very much in PL/SQL.
    Edited by: Frank Kulash on Jan 10, 2013 6:56 AM

  • Failed to accept user input when run report on Web

    I've testing a report with one input parameter. It's a date with default current date. It is done by using SQL 'select sysdate from dual;' has been added to before form trigger. User is allowed to input any date other than the default sysdate before submitting the report. The report works fine when run in report builder, but it's failed to accepted user input date when called through web browser. The report still uses the current date as SQL parameter rather than user input date.
    Can anyone help me to fix this bug?
    The report is develped by Oracle 9i and is saved and run in .rdf format.

    I created a report with a user defined parameter p_date of DATE type. In the layout model, I created a field with p_date as data source. In the before form trigger, I put
    'select sysdate into :p_date from dual;
    I run the report through rwservlet:
    http://host:port/reports/rwservlet?report=datetest.rdf&destype=cache&desformat=html&userid=scott/tiger@orcl&paramform=yes
    In the html parameter form, I change the date from default current date to a future date and that date is shown in the final report.
    So I can't reproduce the bug.
    One thing you can try it to turn on reports server trace file, see what command line is sent to reports server when you submitting the parameter form.
    Thanks,
    -Shaun

  • Accept user input

    Dear All,
    How do we accept user input in isql*plus in 9i? I am writing pl/sql code that requires user input but i get the message:
    SP2-0850: Command "accept" is not available in iSQL*Plus
    the figure you requested is:
    PL/SQL procedure successfully completed.

    Also you can use some commands at sqlplus to add/delete/append lines of sql buffer.
    append (a)
    insert (i)
    del (d)
    run (r)iline (l) nth line (1l or 2l ...)
    change c/<old value>/<new value>
    etc.,
    << Sample >>
    SRI>select * from bonus;
    ENAME JOB SAL COMM
    Sri DBA 1000 123
    Sam Sales 1022 10
    Elapsed: 00:00:00.00
    SRI>c/*/ename,job
    1* select ename,job from bonus
    SRI>r
    1* select ename,job from bonus
    ENAME JOB
    Sri DBA
    Sam Sales
    Elapsed: 00:00:00.01
    SRI>i
    2 where ename = 'Sri';
    ENAME JOB
    Sri DBA
    Elapsed: 00:00:00.01
    SRI>;
    1 select ename,job from bonus
    2* where ename = 'Sri'
    SRI>2
    2* where ename = 'Sri'
    SRI>DEL
    SRI>;
    1* select ename,job from bonus
    -Sri

  • How to compare user input and database data?

    hi, I am new to JAVA, i hope i didnt post wrong forum :P
    I would like to know how to get user data input from web page(client side) and compare with the data in database (server side)?
    What i doiong is using the JavaScript to get the user input and compare with the JSP. but this way it seem like not a good way! Because i facing a lot of problem to get the user input!!
    Thx a lot!!
    function pasteData(obj){
              var em_num_select = obj;
         //document.write(em_num_select);
              <%
                SQLSelectNO = "SELECT em_num FROM emmast ";
                   try {
                        getEmpNo = db.execSQL(SQLSelectNO);
                   }catch(SQLException e){
                        System.err.println("Query Error!!");
                   while(getEmpNo.next()){
                        matchEmpNo = getEmpNo.getString("em_num");
                        %>if (em_num_select == '<%=matchEmpNo%>'){
                        <%
                                  String SQLgetAllInfo = "SELECT em_num, em_name, em_init, "+
                                                                                         "em_buyer_flag, em_dsgn_cde, em_proj_all, "+
                                                                                         "em_proj_cde1, em_proj_cde2, em_proj_cde3 "+
                                                                                         "FROM emmast "+
                                                                                         "WHERE em_num = '"+matchEmpNo+"' ";
                                  try{
                                       getAllInfo = db.execSQL(SQLgetAllInfo);
                                  }catch(SQLException e){
                                       System.err.println("Query Error");
                                  while(getAllInfo.next()){%>
                                       document.all.emp_name.value = '<%=getAllInfo.getString("em_num")%>'
                                       document.all.emp_init.value = '<%=getAllInfo.getString("em_name")%>'
                                       document.all.emp_disg.value = '<%=getAllInfo.getString("em_dsgn_cde")%>'
                                       document.all.emp_buyer_flg.value = "<%=getAllInfo.getString("em_buyer_flag")%>";
                                       document.all.emp_basis.value = "<%=getAllInfo.getString("em_proj_all")%>";<%System.out.println(getAllInfo.getString("em_proj_cde1"));%>
                                       document.all.emp_pro_cde1.value = "<%=getAllInfo.getString("em_proj_cde1")%>";
                                       document.all.emp_pro_cde2.value = "<%=getAllInfo.getString("em_proj_cde2")%>";
                                       document.all.emp_pro_cde3.value = "<%=getAllInfo.getString("em_proj_cde3")%>";
                             <%}%>
                             }//close if (em_num_select == '<%=matchEmpNo%>')
              <%}// close hile(getEmpNo.next())%>
         }// close function pasteData(obj)

    Hi,
    This forum is exclusively for Sun Java Studio Creator.
    You may need to post this question at:
    http://forum.java.sun.com/forum.jspa?forumID=45
    Thanks,
    Creator Team.

  • After "Hello World" - my first adventure in accepting user input

    Hey
    I'm trying to teach myself java and I'm attempting to move on from printing hello world to the screen :)
    I've written the following:
    import java.io.*;
    public class firstapp {
         int value1,
              value2,
              result;
         public static int add(int value1, int value2){
             return value1 + value2;
         public static void main(String args[]){
              int value1,
                        value2,
                        result;
              BufferedReader reader;
              reader = new BufferedReader(new InputStreamReader(System.in));
              //try block
              try{
                   System.out.println("Please type the first number");
                   value1 = reader.read();
                   System.out.println("Please type the second number");
                   value2 = reader.read();
                   result = add(value1,value2);
                   System.out.println("Added together they equal " + result);
         catch (IOException ioe){
              System.out.println("Something bad happened");{
         }It doesnt do what I expected though. It prompts for the first number which i enter. It then prints "Please type the second number" but doesnt accept any input and goes on to print "Added together they equal 62" (this is when 1 is entered as the first number).
    Im so new to this so excuse it being the most basic of basic questions. But where is it getting 62 from?
    Thanks

    BufferedReader.read() isn't the best method for this. It reads a single character, which you store as an int. If you entered "5" for example, the ascii value of 5 is being stored, not the value 5. The second read() call is most likely reading the carriage return, so it adds 53 and 13, and prints that out, for example. If you have version 1.5 or better, use the Scanner class instead, it has a nextInt() method that does what you want.

  • How to re-execute anonymous PL/SQL block in package definition ?

    Hi all,
    I implemented a package which contains procedures and an anonymous PL/SQL block.
    This anonymous PL/SQL block is executed only once when the package is called.
    and charge in-memory the content of table to avoid multiple SQL access each
    time one procedure is called.
    As my application open many sessions to the Oracle database, I would like to try
    a solution to signal all sessions to reload the content of table when the content
    of table is modified. The solution to stop and to restart the connection is not
    acceptable.
    Best regards
    Sylvain

    > .. to avoid multiple SQL access each time one procedure is called.
    As I understand your posting, this is the actual technical requirement. You want to force serialisation of PL/SQL code. Correct? (only one session at a time can run the procedure)
    This feature typically used to accomplish this in o/s code is called a semaphore. PL/SQL does not specifically support semaphores. However, it supports a range of IPC (Inter Process Communication) methods - from message queues to pipes.
    One of these IPC interfaces is DBMS_LOCK - which allows a unique lock to be defined and processes to manage their resource usage/execution/etc via this lock using the DBMS_LOCK API.
    I've found this a pretty clean and manageable solution to enforce serialisation. Of course, it is even better not to enforce serialisation. Rather design the code to be thread safe and capable of multi-processing/parallel processing.
    Personally, I would not use a table as an IPC mechanism as Oracle already provides better IPC mechanisms for PL/SQL code. As for "signalling sessions to re-load the table" - not possible as Oracle sessions cannot register callbacks to handle events. Oracle sessions are not event driven processes from a PL/SQL (application development) perspective.

  • After updating to iOS7 I am trying to log in the Game Center with my  user ID  and it says that is in use and I need to enter another one?

    After updating to iOS7 I am trying to log in the Game Center with my  user ID  and it says that is in use and I need to enter another one?

    You may be able to find your Apple ID at Look up your old and forgotten Apple ID

  • Construct a Sql block using With Clause to improve the performance

    I have got four diff parametrized cursor in my Pl/Sql Procedure. As the performance of the Procedure is very pathetic,so i have been asked to tune the Select statements used in those cursors.
    So I am trying to use the With Clause in order to club all those four Select Statements.
    I would appreciate if anybody can help me to construct the Sql Block using With Clause.
    My DB version is..
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    Four Diff cursors are defined below.
    CURSOR all_iss (
          b_batch_end_date   IN   TIMESTAMP,
       IS
          SELECT isb.*
                FROM IMPLMN_STEP_BREKPN  isb
               , ISSUE iss
          WHERE isb.issue_id = iss.issue_id
           AND iss.issue_status_id  =  50738
           AND ewo_no IN
          (SELECT TO_CHAR(wo_no)
            FROM MGO_PLANT_AUDIT
           WHERE dml_status = 'U' OR dml_status = 'I')
          UNION ALL
          SELECT isb.*
           FROM IMPLMN_STEP_BREKPN  isb
            , ISSUE iss
           WHERE isb.issue_id = iss.issue_id
           AND iss.issue_status_id  =  50738
           AND CAST (isb.last_updt_timstm AS TIMESTAMP) >=
                                                                  b_batch_end_date;
          CURSOR ewo_plant  ( p_ewo_no IN  IMPLMN_STEP_BREKPN.ewo_no%TYPE)
          IS
          SELECT DISTINCT wo_no ,
          plant_code
          FROM MGO_PLANT
          WHERE TO_CHAR(wo_no) = p_ewo_no;
          CURSOR iss_ewo_plnt (
          p_issue_id IN IMPLMN_STEP_BREKPN.issue_id%TYPE ,
          p_ewo_no IN IMPLMN_STEP_BREKPN.EWO_NO%TYPE,
          p_plnt_code IN IMPLMN_STEP_BREKPN.PLT_FACLTY_ID%TYPE)
          IS
          SELECT *
          FROM IMPLMN_STEP_BREKPN
          WHERE issue_id = p_issue_id
          AND ewo_no = p_ewo_no
          AND
          (plt_faclty_id = p_plnt_code
          OR
          plt_faclty_id IS NULL);
          CURSOR iss_ewo_plnt_count (
          p_issue_id IN IMPLMN_STEP_BREKPN.issue_id%TYPE ,
          p_ewo_no IN IMPLMN_STEP_BREKPN.EWO_NO%TYPE,
          p_plnt_code IN IMPLMN_STEP_BREKPN.PLT_FACLTY_ID%TYPE)
          IS
          SELECT COUNT(*)
          FROM IMPLMN_STEP_BREKPN
          WHERE issue_id = p_issue_id
          AND ewo_no = p_ewo_no
          AND
          (plt_faclty_id = p_plnt_code
          OR
          plt_faclty_id IS NULL);

    Not tested. Some thing like below. i just made the queries as tables and given name as a,b,c and substituted columns for the parameters used in the 2nd cursor and third cursor. Try like this.
    CURSOR all_iss (
    b_batch_end_date IN TIMESTAMP,
    IS
    select a.*,b.*,c.* from
    ( SELECT isb.*
    FROM IMPLMN_STEP_BREKPN isb
    , ISSUE iss
    WHERE isb.issue_id = iss.issue_id
    AND iss.issue_status_id = 50738
    AND ewo_no IN
    (SELECT TO_CHAR(wo_no)
    FROM MGO_PLANT_AUDIT
    WHERE dml_status = 'U' OR dml_status = 'I')
    UNION ALL
    SELECT isb.*
    FROM IMPLMN_STEP_BREKPN isb
    , ISSUE iss
    WHERE isb.issue_id = iss.issue_id
    AND iss.issue_status_id = 50738
    AND CAST (isb.last_updt_timstm AS TIMESTAMP) >=
    b_batch_end_date) a,
    ( SELECT DISTINCT wo_no ,
    plant_code
    FROM MGO_PLANT
    WHERE TO_CHAR(wo_no) = p_ewo_no) b,
    ( SELECT *
    FROM IMPLMN_STEP_BREKPN
    WHERE issue_id = p_issue_id
    AND ewo_no = p_ewo_no
    plt_faclty_id IS NULL) c
    where b.wo_no = c.ewo_no and
    c.issue_id = a.issue_id ;
    vinodh
    Edited by: Vinodh2 on Jul 11, 2010 12:03 PM

  • Accepting User input in SQL*Plus

    I am writing a SQL script in SQL*Plus that accepts a value from the user and plugs that value into a variable that exist in several locations outside of the PL/SQL block.
    I am able to do this, yet everytime this variable is encountered, the user is prompted for input. I would like to have the user prompted only once at the beginning and then use that value throughout. This seems like a simple task, yet I cannot get it to work.
    Any help would be greatly appreciated.

    You can use &&<variable_name> and it will define the variable and use it throughout the SQL code.

  • Sql  plus not accepting user id and password as scott, tiger resp

    Hi, this is mihir shah
    I have just installed oracle9i
    And I have a problem in opening the sql plus. It asks for user id and pass but when entered scott, tiger it always gives a tns error.
    Could you tell me how to make a database & how to log on & how to make a new user id and password

    It seem that you have problem with network connectivity to you database.
    Check the listener status and the configuration of the files: tnsnames.ora & listener.ora
    In all cases you must specified the error.
    Bye, Aron

Maybe you are looking for

  • Outbound calls doesn't display the DID number ?

    hi all, Q1.) With refer to belows, I hope the "Calling Party Number i = 0x0081, '33800' " should appear '8883800' ? Q2.) I hope my mobilephone will display 8883800 instead of just the extension number 33800 as you seen belows. Any idea how to do that

  • Not Showing Up Right in Internet Explorer?

    Hi again, After inserting products into my website (www.proheader.com/alpha.html), they don't seem to show up right. Here's how one of the product categories look in Apple Safari and Google Chrome: http://i29.tinypic.com/34hyys9.png Here's how it sho

  • Extending domain

    trying to extend domain on windows I get this error please help Preparing... Extracting Domain Extension Contents... Saving the Domain Information... Domain Extension Application Failed! Domain Location: C:\app2\user_projects\domains\bifoundation_dom

  • Need a cheap way to output sound in Apple TV

    I recently bought an Apple TV and a cheap Samsung Monitor. When hooking up the monitor to my Apple Air via the Thunderbolt all is fine I get audio and video. However when hooked up to the Apple TV via the HDMI lead I don't get any sound. So I need a

  • IPhoto won't export photos without restarting iPhoto

    i'm running snow leopard and the newest update of iPhoto '09. I can export photos just fine, but if I try and export photos a 2nd time, the progress bar from the previous session is still there and I can't choose my export options (nor can I do anyth