Sql Plus  Setting where It must  searching Scripts

Hi
How can I to define inside Sql Plus with command , where It must search scripts
Why when I put :
@myscript.sqland inside there is other scripts, It not found
unable to open file "CONTIG_PS_LOC_ITM_TYPE.SQL"CONTIG_PS_LOC_ITM_TYPE.SQL is in same directory myscript.sql

Hey
inside the your first script you can execute the second one as "@@CONTIG_PS_LOC_ITM_TYPE.SQL"
for the first script you can give the absolut path or the default path is $ORACLE_HOME/rdbms...
Regards

Similar Messages

  • Preference equivalents for relevant SQL*Plus set commands?

    I know that the SQL*Plus set command is not supported in Raptor (as per http://www.oracle.com/technology/products/database/project_raptor/sql_worksheet_commands.html), but there are a number of set options that are relevant.
    For example, set define (for which "set define off" is covered in Ampersand in scripts We have a number of existing SQL scripts where we have set the define character to something apart from & to avoid issues where this is a required value in the code.
    Setting server output size is another option - as per set serveroutput on size unlimited .
    Is there any proactive plan to provide preferences equivalent to the set options that are relevant (to either SQL scripts or the various output tabs)? Or is the exclusion of the SQL*Plus set command only for the current version and it will be included later? From the discussion on the forums so far, it seems as though you are looking at each set option as it is raised, rather than being proactive about it.
    Even if Raptor does provide preferences, it would still be useful for the equivalent set commands to work. Lets say that we do get a preference for the define character - 99% of the time, scripts want this to be & - however there are some where the script wants it to be $ (or whatever). With a preference, I need to know what the script wants and change the preference before running the script and then change it back afterwards.

    Hi Turloch,
    When is this script executed ?
    In 3.1EA2 I created a sql script where a variable is defined and set this script as you suggested.
    Script:
    define varname=abc
    When I open a connection, a worksheet is automatically opened. I run this statements:
    select '&varname' from dual;
    define varname=xyz
    select '&varname' from dual;
    Running the first select statement results in a popup window for entering a value for the substitution variable, while I was expecting the value abc as the result of the query.
    See also this blog where the login script is explained.
    But in my SQL Developer 3.1EA2 64-bit on Windows 7 it doesn't work like that.
    Is this a bug?
    Dennis

  • W'azup with SQL Developer barfing on SQL*Plus "set" commands

    Check out this short script and the results it generates, as pasted below.
    I can't find anything in the SQL Dev documenation re: what SQL*Plus set commands it supports and which it considers "passe." I'm particularly puzzled by the "column ... format ..." command getting ignored.
    set heading off
    set pagesize 0
    set linesize 80
    set feedback off
    prompt ...start...
    column x format a5
    select 'abcdefghij' x from dual;
    prompt ...end...
    line 1: SQLPLUS Command Skipped: set heading off
    line 2: SQLPLUS Command Skipped: set pagesize 0
    line 3: SQLPLUS Command Skipped: set linesize 80
    ...start...
    X ----------
    abcdefghij 1 rows selected
    ...end...

    For supported SQL*Plus commands: SQL Developer Help > SQL Developer Concepts and Usage > Using the SQL Worksheet > SQL*Plus Statements Supported and Not Supported in SQL Worksheet.
    The "column ... format ...." command is not supported. A workaround is to use substr in your select statement.
    See also How to set a column size in sqldeveloper?

  • Error in calling SQL plus program with parameter from Shell script

    This is my Shell script. I am trying to call in the SQL plus program with the parameter and the shell script is registered as a concurrent program.
    PARAMETERS=`echo $1 |tr -d '\"'`
    DB_USER_ID=`echo $PARAMETERS|cut -d" " -f3|cut -d"=" -f2`
    CONN_STRING=$DB_USER_ID
    REQ_DATE=`echo $PARAMETERS|cut -d" " -f9|cut -d"=" -f2`
    timestamp=`date +%m-%d-%y-%H:%M:%S-%Z`
    timestam=`date +%y-%m-%d`
    sqlplus -s $CONN_STRING @ar_statement.sql $REQ_DATE
    chmod 755 statement.sh
    . statement.sh
    My Sql plus program is like this.
    set pagesize 0
    set heading off
    set feedback off
    spool $GEC_TOP/log/ge_ar_statement.sh
    select output_file_name
    from fnd_concurrent_requests
    where trunc(actual_completion_date) = '&2';
    spool off;
    exit;
    When i run the concurrent program, i am getting the following error:
    ar_statement: line 14: REQ_DATE: command not found
    Enter value for 2:
    User requested Interrupt or EOF detected.
    ar_statement.sh: line 1: Enter: command not found
    ar_statement.sh: line 2: User: command not found
    ar_statement
    Program exited with status 127
    I am not strong at Unix Porgamming and i would request someone who can
    help me out as soon as possible.
    I need this solution quickly and thank everyone in advance.
    Thanks.

    Can you put your coding between code statements, like shown in the FAQ. It will be easier to read.
    Looking at your script, my first guess is that crontab will not find your sqlplus since your script does not have $HOME/bin in the $PATH. From what I understand, running .profile in your script will not work either because variables are exported to sub-shells, not to the shell above. You can call your script with a dot like . ./script which means that the script will run like it was typed at the command prompt. But it will be less confusing to define appropriate variables in the script. eg.
    ORACLE_SID=my_instance_name
    ORACLE_HOME=/my_path_to_oracle_home_directory
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    PATH=$ORACLE_HOME/bin:$PATH
    I remember some slightly different way of coding to handle the sqlplus return codes.
    For instance:
    sqlplus -s /nolog > /dev/null <<-EOF
    connect system/manager
    @ssm.sql
    whenever oserror exit failure
    whenever sqlerror exit failure
    EOF
    sql_err=$?
    if [ $sql_err -ne 0 ]; then
       echo "FAILURE"
    else
       echo "SUCCESS"
    fiThe - in -EOF supresses tab's
    Using connect will prevent ps from showing your login credentials
    In some versions of bash the ending EOF needs to be at the beginning of the line to work.
    Edited by: waldorfm on Jul 14, 2010 7:05 PM
    complaining about putting code between code delimiters and forgot myself ;-)
    Edited by: waldorfm on Jul 14, 2010 7:08 PM
    Btw, if you "source" a script running it like . .script, than an exit in that script will log you out.

  • SQL*Plus column command not working with Script Runner

    SQL Developer EA 2.1
    When running a script (interactive or from a file), the COLUMN commands are ignored. The documentation (User's Guide 1.7.1) says that COLUMN is supported, but the headings set in the column command are not changed. As a test, the SET FEEDBACK OFF command is processed.
    SET FEEDBACK OFF
    COLUMN ename HEADING 'Name'
    COLUMN job HEADING 'Job'
    COLUMN deptno HEADING 'Dept'
    SELECT ename as ename, JOB, DEPTNO
    FROM EMPLOYEES;
    The documentation for Script Runner (User's Guide 1.7.2) says that a much more limited set of SQL*Plus commands are available.
    Is this intended behavior? If so, the documentation should reflect that the COLUMN command is ignored.

    Hi,
    Doc bug logged:
    Bug 9015160 - OTNEA1: USER GUIDE COLUMN SUPPORTS 'COLUMN...NEWVAL' ONLY
    The user guide says column is supported, but
    Column supports the following new_value use only
    i.e. moving a value from a selected column to a substitution variable:
    column aval new_v a
    select 1 aval from dual;
    select '&a' || ' is 1' from dual;
    Output:
    AVAL
    1
    1 rows selected
    '1'||'IS1'
    1 is 1
    1 rows selected
    -Turloch

  • SQL * PLUS - setting wrap on for column

    hi all, i am playing around with sql plus and i encountered the following problem.
    1) is length 10 the default column length for columns with number datatype in sqlplus, i done a select statement and all my column for number have a length of 10
    2) why cant i format the length of a number column. i type column empno format 999
    although my numbers become #### but "empno" and a length of 10 is still shown at the column name instead of just "emp"
    3) how come a column name canot be wrapped
    when i set wrap on.
    set wrap on
    column ename format a3
    only the values of ename are wrap
    but the column name "ename" isnt wrap
    into ena
    me
    thanks.

    Some examples :
    TEST@db102 > select 1234567890123 from dual;
    1234567890123
       1.2346E+12
    TEST@db102 > set numwidth 15
    TEST@db102 > /
      1234567890123
      1234567890123
    TEST@db102 > col ename for a3 wrapped
    TEST@db102 > select ename from emp where empno=7902;
    ENA
    FOR
    D
    TEST@db102 > You can find everything in the documentation

  • SQL*PLUS: Setting a concrete RETURN CODE

    I don't know how to force a concrete EXIT CODE for in a SQL*PLUS process.
    I use "WHENEVER SQLerror EXIT SQL.SQLCODE" and a "EXIT SQL.SQLCODE;" at the end of the process.
    But I need to be able to exit the process with a sqlcode "54" or "23" or whatever I want...
    Any suggestions?
    WHENEVER SQLerror EXIT SQL.SQLCODE
    DECLARE
    BEGIN
    END;
    EXIT SQL.SQLCODE;
    -------------------------------------------------------

    You can just do EXIT n to exit with integer return code n.
    $ sqlplus dqm
    SQL*Plus: Release 10.2.0.3.0 - Production on Mon Jan 11 11:48:46 2010
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit 54
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    $ echo $?
    54

  • SQL Plus Skipping Where Clause

    Question: We are using .sql files, that are executed though SQLPlus to implement our production code, we have had instances where a developer put a extra line in the middle of his SQL statement. In the below examples, the 2nd script will execute and delete everything in the entire table, then give a error message message stating that it doesn't know what 'WHERE' is, and then commits(Only happens when executing from a .sql file, if you put the below SQL in the buffer and execute it... it doesn't happen)... does anyone know a way to tell SQLPlus to ignore carrage returns as the end of the SQL statement?
    Example 1: Delete 1 Row
    DELETE FROM TABLE1
    WHERE ID = 1;
    COMMIT;
    Example 2: Delete's ALL Rows
    DELETE FROM TABLE1
    WHERE ID = 1;
    COMMIT;

    set sqlblankline on
    (this default value is off)
    and addtional...
    set sqlterminator ;
    (this default value is ;)
    Message was edited by:
    ushitaki

  • SQL Plus: Set pagesize and line size

    Can anyone help me make my output look better...... output below....what do I need to set?
    CUST_ID
    CUS_NAME
    1
    Leroy
    2
    Rama
    3
    Riley
    4
    Adena
    5
    Stuart
    6
    Jena
    7
    Tanisha
    8
    Shellie
    9
    Ignacia
    10
    Reuben

    btw you can use ** tags for preserving formatting code and results in this forum. See the FAQ for more formatting help.                                                                                                                                                                                                                                                           

  • SQL PLUS set column output side by side

    I am trying to match my colum data with my row so when i query the data at least its readable side by side inside of top and bottom
    cus_id
    cus_name
    999996
    Allen
    999997
    Cameran
    I want the ouput to look like this
    cus-id cus_name
    999996 Allen
    999997 Cameran
    thanks
    Edited by: user11232525 on Dec 10, 2009 10:37 AM

    i tried that the the ouput this look messy - see below
    CUS_ID
    CUS_NAME
    999901
    Eaton
    999902
    Lane
    999903
    Cody
    thanks

  • A question about the impact of SQL*PLUS SERVEROUTPUT option on v$sql

    Hello everybody,
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0  Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>
    OS : Fedora Core 17 (X86_64) Kernel 3.6.6-1.fc17.x86_64I would like to ask a question about the SQL*Plus SET SERVEROUTPUT ON/OFF option and its impact on queries on views such as v$sql and v$session. Here is the problem
    Actually I define three variables in SQL*Plus in order to store sid, serial# and prev_sql_id columns from v$session in order to be able to use them later, several times in different other queries, while I'm still working in the current session.
    So, here is how I proceed
    SET SERVEROUTPUT ON;  -- I often activate this option as the first line of almost all of my SQL-PL/SQL script files
    SET SQLBLANKLINES ON;
    VARIABLE mysid NUMBER
    VARIABLE myserial# NUMBER;
    VARIABLE saved_sql_id VARCHAR2(13);
    -- So first I store sid and serial# for the current session
    BEGIN
        SELECT sid, serial# INTO :mysid, :myserial#
        FROM v$session
        WHERE audsid = SYS_CONTEXT('UserEnv', 'SessionId');
    END;
    PL/SQL procedure successfully completed.
    -- Just check to see the result
    SQL> SELECT :mysid, :myserial# FROM DUAL;
        :MYSID :MYSERIAL#
           129   1067
    SQL> Now, let's say that I want to run the following query as the last SQL statement run within my current session
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;According to Oracle® Database Reference 11g Release 2 (11.2) description for v$session
    http://docs.oracle.com/cd/E11882_01/server.112/e25513/dynviews_3016.htm#REFRN30223]
    the column prev_sql_id includes the sql_id of the last sql statement executed for the given sid and serial# which in the case of my example, it will be the above mentioned SELECT query on the employees table. As a result, right after the SELECT statement on the employees table I run the following
    BEGIN
        SELECT prev_sql_id INTO :saved_sql_id
        FROM v$session
        WHERE sid = :mysid AND serial# = :myserial#;
    END;
    PL/SQL procedure successfully completed.
    SQL> SELECT :saved_sql_id FROM DUAL;
    :SAVED_SQL_ID
    9babjv8yq8ru3
    SQL> Having the value of sql_id, I'm supposed to find all information about cursor(s) for my SELECT statement and also its sql_text value in v$sql. Yet here is what I get when I query v$sql upon the stored sql_id
    SELECT child_number, sql_id, sql_text
    FROM v$sql
    WHERE sql_id = :saved_sql_id;
    CHILD_NUMBER   SQL_ID          SQL_TEXT
    0              9babjv8yq8ru3    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;Therefore instead of
    SELECT * FROM employees WHERE salary >= 2800 AND ROWNUM <= 10;for the value of sql_text I get the following value
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES);Which is not of course what I was expecting to find in v$sql for the given sql_id.
    After a bit googling I found the following thread on the OTN forum where it had been suggested (well I think maybe not exactly for the same problem) to turn off SERVEROUTPUT.
    Problem with dbms_xplan.display_cursor
    This was precisely what I did
    SET SERVEROUTPUT OFFafter that I repeated the whole procedure and this time everything worked pretty well as expected. I checked SQL*Plus documentation for SERVEROUTPUT
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Could anyone kindly make some clarification?
    thanks in advance,
    Regards,
    Dariyoosh

    >
    and also v$session page, yet I didn't find anything indicating that SERVEROUTPUT should be switched off whenever views such as v$sql, v$session
    are queired. I don't really understand the link in terms of impact that one can have on the other or better to say rather, why there is an impact
    Hi Dariyoosh,
    SET SERVEROUTPUT ON has the effect of executing dbms_output.get_lines after each and every statement. Not only related to system view.
    Here below what Tom Kyte is explaining in this page:
    Now, sqlplus sees this functionality and says "hey, would not it be nice for me to dump this buffer to screen for the user?". So, they added the SQLPlus command "set serveroutput on" which does two things
    1) it tells SQLPLUS you would like it <b>to execute dbms_output.get_lines after each and every statement</b>. You would like it to do this network rounding after each call. You would like this extra overhead to take place (think of an install script with hundreds/thousands of statements to be executed -- perhaps, just perhaps you don't want this extra call after every call)
    2) SQLPLUS automatically calls the dbms_output API "enable" to turn on the buffering that happens in the package.Regards.
    Al

  • Execution of Immediate SQL in compiled package in two versions of SQL*PLUS

    A peculiar problem has risen in our database.
    Execution of Immediate SQL in compiled package in two versions of SQLPLUS gives different results
    We have a compiled package with two procedures that contain immediate SQL statements, and these are:
    +PROC_DELETE_ROWS+
    +     -- This immediate sql deletes unreferenced Document Types from the DOC_REF_TYPE table+
    +     delete from doc_ref_type t where exists (select 1 from PROARC_DOC_REF_TYPE_VW d where d.doc_ref_type = t.doc_ref_type)+
       +     and not exists (select 1 from doc_ref d where d.doc_ref_type = t.doc_ref_type)+
       +     and doc_ref_type not in (select doc_ref_type from eis_doc_ref_type)+
       +     and doc_ref_type not in (select eis_doc_ref_type from eis_doc_ref_type)+
    +PROC_ADD_NEW_ROWS+
    +     -- Drop the temporary table+
    +     drop table TMP_PROARC_DOC_REF_TYPE+
    +     -- Create a temporary table+
    +     create table tmp_PROARC_DOC_REF_TYPE as+
    +     select DOC_REF_TYPE, substr(DOC_REF_TYPE_DESC,1,100) as DOC_REF_TYPE_DESC+
    +     from PROARC_DOC_REF_TYPE_VW+
    +     -- Insert document types that do not exist in the DOC_REF_TYPE table+
    +     insert into doc_ref_type t (DOC_REF_TYPE, DOC_REF_TYPE_DESC)+
            +     select distinct DOC_REF_TYPE, DOC_REF_TYPE_DESC from tmp_PROARC_DOC_REF_TYPE s+
            +     where not exists (select 1 from doc_ref_type t where t.doc_ref_type = s.doc_ref_type)+
    I am using the following test script:
    +Exec mypackage.proc_delete_rows;+
    +Commit;+
    +Select count(*) from DOC_REF_TYPES;+
    +Exec mypackage.proc_add_new_rows;+
    +Commit;+
    +Select count(*) from DOC_REF_TYPES;+We have a Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    I am using SQL*Plus: Release 8.1.7.0.0
    The test script is working as expected.
    Count after delete =155
    Count after insert = 511
    but when I use another computer with SQL*Plus: Release 10.x
    The Test script returns the following
    Count after delete =155
    Count after insert =155
    The same is happening when I am running the scripts as a scheduled job.
    QUESTION:
    I believe I have found a fix for the problem though. By changing tmp_PROARC_DOC_REF_TYPE in the insert statement to all upper case, the script is running in both environments apparently. But how is this possible? I am executing a compiled package in the database. The session shell should have no impact on the behaveour of the procedure I am calling. What causes this?
    Edited by: Reon on Jun 16, 2011 4:44 AM

    1) I am using the same user (PANDORA)
    2) (PANDORA) for both
    3) I am actually not handling any errors. Just skipping any error altogether. I'll check to see what exceptions are raised, and come back.
    I have also noticed that SQL/PLUS is not the culprit here. If I use SQLTools 1.5 to run the script, the same thing happens. So it has to do something with the connection or session environment that is inheritet to both clients.
    The CODEZ:_
      procedure add_doc_types IS
      sqlstr     VARCHAR2(2000);
      begin
      BEGIN
           sqlstr := 'drop table TMP_PROARC_DOC_REF_TYPE';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
      BEGIN
           sqlstr := 'create table tmp_PROARC_DOC_REF_TYPE as select DOC_REF_TYPE, substr(DOC_REF_TYPE_DESC,1,100) as DOC_REF_TYPE_DESC from PROARC_DOC_REF_TYPE_VW';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
        BEGIN
            sqlstr := 'insert into doc_ref_type t (DOC_REF_TYPE, DOC_REF_TYPE_DESC)
                    select distinct DOC_REF_TYPE, DOC_REF_TYPE_DESC from TMP_PROARC_DOC_REF_TYPE s
                    where not exists (select 1 from doc_ref_type t where t.doc_ref_type = s.doc_ref_type)';
         EXECUTE IMMEDIATE sqlstr;
            sqlstr := 'update doc_ref_type t set DOC_REF_TYPE_DESC = (
                    select DOC_REF_TYPE_DESC from tmp_PROARC_DOC_REF_TYPE s
                    where t.doc_ref_type = s.doc_ref_type)
                    where exists (select 1 from tmp_PROARC_DOC_REF_TYPE s where t.doc_ref_type = s.doc_ref_type)';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
      end add_doc_types;
      procedure delete_doc_types IS
      sqlstr     VARCHAR2(2000);
       BEGIN
            sqlstr := 'delete from doc_ref_type t where exists (select 1 from PROARC_DOC_REF_TYPE_VW d where d.doc_ref_type = t.doc_ref_type)
            and not exists (select 1 from doc_ref d where d.doc_ref_type = t.doc_ref_type)
            and doc_ref_type not in (select doc_ref_type from eis_doc_ref_type)
            and doc_ref_type not in (select eis_doc_ref_type from eis_doc_ref_type)';
          EXECUTE IMMEDIATE sqlstr;
         EXCEPTION
           WHEN OTHERS THEN
             null;
      end delete_doc_types;Edited by: Reon on Jun 16, 2011 2:01 AM

  • SQL Plus giving SP2-0024: Nothing to change error

    I'm just about to lose my mind.
    I'm running the following in SQL Plus -
    set echo off
    set feedback off
    set linesize 1000
    set sqlprompt ''
    spool c:\TEMP2\App_Eng1.csv replace
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1 from PSPROJECTITEM B, PSAEAPPLDEFN A
    Where B.PROJECTNAME = 'PRJ732075'
    and B.SOURCESTATUS = 2
    and B.TARGETSTATUS = 1
    and B.OBJECTVALUE2 = ' '
    and B.OBJECTTYPE=33
    and A.AE_APPLID = B.OBJECTVALUE1
    spool off
    and I get the following in return -
    SQL> set echo off
    SQL> set feedback off
    SQL> set linesize 1000
    SQL> set sqlprompt ''
    spool c:\TEMP2\App_Eng1.csv replace
    SP2-0024: Nothing to change.
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1 from PSPROJECTITEM B, PSAEAPPLDEFN A
    2 Where B.PROJECTNAME = 'PRJ732075'
    3 and B.SOURCESTATUS = 2
    4 and B.TARGETSTATUS = 1
    5 and B.OBJECTVALUE2 = ' '
    6 and B.OBJECTTYPE=33
    7 and A.AE_APPLID = B.OBJECTVALUE1
    8
    spool off
    SP2-0042: unknown command "off" - rest of line ignored.
    Why am I getting these errors?
    Also, when I clear the SQL, rerun the SQL and try to open the App_Eng1.csv file
    I get a window telling me the file is locked. The only way for me to unlock the file is to shutdown the SQL Plus window. Why is this?
    All I am trying to do is to download data from an Oracle table to an Excel spreadsheet. Is there a relatively easy way to do this using SQL Developer code or should I continue to fight with SQL Plus? I'm trying to automate a process so I don't want to use the manual steps like the DTS Import by Excel.
    Any help? Please?

    Thanks for the info. I have another issue. I'm not sure that my Spool Off command is being recognized. Here's the script I'm running -
    set echo off
    set feedback off
    set linesize 1000
    set sqlprompt ''
    SELECT COUNT(*) FROM PSPROJECTITEM;
    spool c:\TEMP2\App_Eng1.csv replace
    Select A.OBJECTOWNERID||','||B.OBJECTVALUE1
    from PSPROJECTITEM B, PSAEAPPLDEFN A
    Where B.PROJECTNAME = 'PRJ732075'
    and B.SOURCESTATUS = 2
    and B.TARGETSTATUS = 1
    and B.OBJECTVALUE2 = ' '
    and B.OBJECTTYPE=33
    and A.AE_APPLID = B.OBJECTVALUE1;
    spool off
    Most of the time the App_Eng1.csv file is telling me that it can't be opened because it's being used by another user, even after I close SQL Plus. I have to physically perform the Spool Off command from the menu. But even then the csv file is blank. Any ideas?

  • Procedure works in sql plus, shows error in sql dev

    I create a package spec and body via a script in sql plus. Following is part of script:
         procedure updateMetricValue(p_metricValueId_in IN number,
         p_username_in IN metricvalue.entryBy%TYPE,
         p_value_in IN VARCHAR2)
         is
         BEGIN
              UPDATE MetricValue
              SET modifiedBy = p_username_in,
                   value = CAST(p_value_in as NUMBER(17,4))
              WHERE id = p_metricValueId_in;
         END updateMetricValue;
    No errors in sqlplus. Runs fine. When I look at the package in SQL Developer 1.0, it shows an error: "expecting identifier" just before the 4 in the line:
    value = CAST(p_value_in as NUMBER(17,4))
    What am I missing?
    Using 9.2.0.1.0 on windows XP as development database.

    I create a package spec and body via a script in sql plus. Following is part of script:
         procedure updateMetricValue(p_metricValueId_in IN number,
         p_username_in IN metricvalue.entryBy%TYPE,
         p_value_in IN VARCHAR2)
         is
         BEGIN
              UPDATE MetricValue
              SET modifiedBy = p_username_in,
                   value = CAST(p_value_in as NUMBER(17,4))
              WHERE id = p_metricValueId_in;
         END updateMetricValue;
    No errors in sqlplus. Runs fine. When I look at the package in SQL Developer 1.0, it shows an error: "expecting identifier" just before the 4 in the line:
    value = CAST(p_value_in as NUMBER(17,4))
    What am I missing?
    Using 9.2.0.1.0 on windows XP as development database.

  • SQL*PLUS HTML reports

    Hi how to add javascripts to the HTML reports generated using SQL*plus :
    SET MARKUP HTML ON SPOOL ON
    If we want to modify the dynamically generated HTML page by SQL*PLUS how does one do that??
    Please help

    If you create a script containing the following it should work:
    set markup html on spool on
    spool <your file>
    run sql-commands here
    spool off
    set markup html off

Maybe you are looking for

  • One song in iTunes won't play

    I am using an iMac with Yosemite os.  I have one song in my iTunes library of thousands of songs that won't play.  It gives the error message that the computer is not authorized and a window to sign in followed by another window to authorize.  When I

  • My external WD 1TB USB3 HDD doesn't work

    My external WD 1TB USB3.0 HDD doesn't work with my new MacBook Pro 13.3" Retina, but works with my old MacBook Pro, MacBook Air and iMac. And also tried it with my friends Mac devices and they are facing the same issue as well. What should we do?

  • On Windows XP x64, why can I upgrade to 20.0.1, but can't install it directly?

    I've tried installing 20.0.1 directly downloaded from the site, and got "doesn't run on your OS" (paraphrase) When I installed 3.6.13, and hit the upgrade button (once to FF12, once to 20.0.1...) I'm now running 20.0.1... why the run-around?

  • HELP! After doing a recent update (Version4.4.2) on my Droid Razr M my messaging has stopped!

    HELP! After doing a recent update (Version4.4.2) on my Droid Razr M my messaging has stopped working. Every time I try to open to sent a text I get ,"Unfortunately, messaging has stopped" message. Any ideas on how to correct this issue??? not liking

  • Application scope variables ... an easier way or not ?

    Instead of sharing application scope variables through the           servletContext()/application I am using a normal singleton class (or maybe           static class) to share all my application varaiable. It works fine and it           takes a lot