Break SQLPLUS command

Version Oracle 11g

Windows XP

I am creating a report from sqlplus on emp table on which I need subtotals and total general breaking on "deptno". So I used

BREAK THE DEPTNO JUMP 1

CALCULATION OF SUM OF SAL ON DEPTNO

CALCULATION OF SUM OF SAL ON REPORT

My requirement is that I need an extra newline after each subtotal. Can you help me what command or setting change. ?

DEPTNO ENAME SAL

--------------        ----------------          -----------

10                    John                    1000

Anil 2000

-----------

3000

< extra new line >

20 300 Fortin

-----------

300

< extra new line >

------------

3300

943841 wrote:

Are you also the total general? Im not getting the total general.

If you also want the total general, then you can try the following

WE BREAK department_id SKIP 2 ON REPORT SKIP 2;

CALCULATE the SUM OF THE salary ON REPORT;

CALCULATE the SUM OF THE salary WE department_id;

SELECT t1.department_id, t1.first_name, t1.salary FROM t1 hr.employees

ORDER BY t1.department_id;

Kind regards

Dariyoosh

Tags: Database

Similar Questions

  • sqlplus: command not found

    I installed oracle as user ora102 and create a new one like:

    / etc/passwd:

    Oracle: x: 54321:54321: / home/oracle: / bin/bash

    ora102:x:54322:54322: / home1/ora102: / bin/ksh

    Headof:x:54323:54325: / home1/mbs/ho/maintain: / bin/bash

    hoserv:x:54324:54325: / home1/mbs/ho/maintain: / bin/bash

    / etc/group:

    oinstall:x:54321:

    DBA:x:54322:Oracle, ora102

    Headof:x:54323:

    hoserv:x:54324:

    test: x: 54325:ora102

    For the user Lechefdela that I have:

    -bash - $3.2 id - a

    UID = 54323 (headof) gid = 54325 (test) groups = 54325 (test)

    My problem is when I run sqlplus:

    -bash-3, $ 2 sqlplus

    -bash: sqlplus: command not found

    the $ORACLE_HOME environment has been defined in the profile of ora102

    Please help me

    Apparently, you have correctly set home.  Follow my previous comment and try to start the database:

    sqlplus/nolog

    ...

    SQL > connect / as sysdba

    Connect to an instance is idle.<===== you="" should="" see="" this="" message="" after="" you="">

    SQL > startup

    David Fitzjarrell

  • PL/SQL in Sql Developer 4 script, works not sqlplus command line.

    Hello guys, Xev here.

    I hope I meet new people there into that in this space. I hope this is the appropriate space to ask this, I see that others have asked about sqlplus and they where permitted to post...

    I have a pl/sql script that runs in sql developer 4, but the exact same script will not run in the sqlplus command line?

    When I run the script, it gives me this, but as you can see with this script that works fine with sql developer, he is not running sqlplus command line.

    ERROR at line 3:

    ORA-06550: line 3, column 28:

    PLS-00201: identifier 'DYNAMIC_COUNTS' must be declared.

    ORA-06550: line 3, column 4:

    PL/SQL: Ignored Element

    ORA-06550: line 39, column 17:

    PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.

    ORA-06550: line 39, column 1:

    PL/SQL: Statement ignored

    ORA-06550: line 41, column 17:

    PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.

    ORA-06550: line 41, column 1:

    PL/SQL: Statement ignored

    ORA-06550: line 43, column 17:

    PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.

    ORA-06550: line 43, column 1:

    PL/SQL: Statement ignored

    ORA-06550: line 45, column 17:

    PLS-00487: Invalid reference to variable 'DYNAMIC_COUNTS % ROWTYPE.

    ORA-06550: line 45, column 1:

    PL/SQL: Statement ignored

    ORA-06550: line 82, column 15:

    PL/SQL: ORA-00942: table or view does not exist

    ORA-06550: line 82, column 3:

    PL/SQL: SQL statement ignored

    Here is the script I use... You define a type of thing in the sqlplus command line?

    Set serveroutput size unlimited

    run the DBMS_OUTPUT. ACTIVATE (buffer_size = > NULL);

    DECLARE

    TYPE nt_tab IS TABLE OF dynamic_counts % ROWTYPE;

    v_nttab nt_tab: = nt_tab();

    FND_LOOK INTEGER.

    v_incr NUMBER: = 0;

    ------------------------------------------------------------------------------------------------------------------------

    BEGIN

    FOR t IN (SELECT master, table_name, column_name

    From all_tab_columns

    Owner WHERE = UPPER ('& SCHEMA_NAME'))

    ------------------------------------------------------------------------------------------------------------------------

    LOOP

    BEGIN

    EXECUTE IMMEDIATE ' with an ACE (select case when REGEXP_LIKE (' | t.column_name |))

    -This search 1 letter and 12 figures-

    ', "^ ([[: alpha:]] |) [[: alpha:]] ({3}) [0-9] {12} $")

    then "match"

    another "no matches found" end up as output of ' | t.Owner | '.' || t.table_name | ')

    Select count (*) in a where a.output = "Match Found" clause '

    IN FND_LOOK;

    ------------------------------------------------------------------------------------------------------------------------

    IF FND_LOOK > 0 THEN

    v_incr: = v_incr + 1;

    v_nttab. EXTEND;

    v_nttab (v_incr) .t_owner: = t.owner;

    v_nttab (v_incr) .t_table_name: = t.table_name;

    v_nttab (v_incr) .t_column_name: = t.column_name;

    v_nttab (v_incr) .fnd_govids: = FND_LOOK;

    END IF;

    ------------------------------------------------------------------------------------------------------------------------

    / * This is for DBMS output, thus we have 2 different ways, one can see the results in the table dynamic_counts

    and in the dbms_output

    */

    IF FND_LOOK > 0 THEN

    Dbms_output.put_line (t.owner |) '.' || t.table_name | ' ' || t.column_name | ' ' || FND_LOOK);

    END IF;

    ------------------------------------------------------------------------------------------------------------------------

    / * Exception Handeling * /.

    EXCEPTION

    WHILE OTHERS

    THEN

    Dbms_output.put_line)

    "Generic error".

    || t.column_name

    || "from".

    || t.Owner

    || '.'

    || t.table_name);

    END;

    END LOOP;

    ------------------------------------------------------------------------------------------------------------------------

    FORALL i IN 1.v_nttab. COUNTY

    INSERT INTO dynamic_counts (t_owner,

    t_table_name,

    t_column_name,

    fnd_govids)

    VALUES (v_nttab (i) .t_owner,

    v_nttab (i) .t_table_name,

    v_nttab (i) .t_column_name,

    v_nttab (i) .fnd_govids);

    COMMIT;

    END;

    /

    Are you sure that you are connected to the database to the same user with both clients?

  • -bash: sqlplus: command not found

    export ORACLE_SID = orcl
    export PATH=$PATH:/app/sandip/product/11.2.0/dbhome_1/bin
    export ORACLEC_HOME=/app/sandip/product/11.2.0/dbhome_1
    $ sqlplus
    -bash: sqlplus: command not found

    Hello;

    This: (Type in the variable ORACLEC_HOME must be ORACLE_HOME)

    export ORACLEC_HOME
    

    will not work. Try:

    export ORACLE_HOME=/home/sandip/app/sandip/product/11.2.0/db home_1
    
    export PATH=$PATH:$ORACLE_HOME/bin
    

    Then try to sqlplus

    Best regards

    mseberg

    Correct the added host Oracle information.

    Published by: mseberg on August 21, 2012 12:18

  • sqlplus: command not found on Linux

    I have installed Oracle 10.2.1.0 in Ubuntu 10.10 My Setup was fine, I could even open isqlplus([http://ubuntu.ubuntu-domain:5560/isqlplus/workspace.uix]) and run queries...]) But, back in the terminal when I try to connect to sqlplus I get error
    oracle@ubuntu:~$ sqlplus / as sysdba
    sqlplus: command not found
    What could be the reason for this?

    Sandy wrote:
    Thanks for the reply Ed... It is very useful

    oracle@ubuntu:~$ env | grep ORA | sort
    ORACLE_HOME=/opt/oracle/oracle/product/10.2.0/db_2
    ORACLE_SID=orcl
    

    even better...

    env | grep -i ora | sort
    

    -I switch tells grep to filter case insensitive. It will also pick up your WAY, if it includes (as it should) a reference to the oracle bin directory.

  • -bash: sqlplus: command not found UNIX

    I just installed oracle on unix database.
    Here is my profile.
    [oracle@sam ~]$ cat .profile
    XAUTHORITY=/root/.xauthcy2rR4
    DISPLAY=:0.0
    ORACLE_HOME=/u01/oracle/10g/PROD
    export ORACLE_HOME
    PATH=$ORACLE_HOME/bin:$PATH
    export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
    TNS_ADMIN=$ORACLE_HOME/network/admin
    ORACLE_SID=PROD
    export LD_LIBRARY_PATH export TNS_ADMIN export DISPLAY export XAUTHORITY
    export ORACLE_SID
    env | grep $ORACLE_HOME
    env | grep $ORACLE_SID
    uname -a
    I ran making
    [oracle@sam ~]$ . .profile
    LD_LIBRARY_PATH=/u01/oracle/10g/PROD/lib:/u01/oracle/10g/PROD/network/lib
    TNS_ADMIN=/u01/oracle/10g/PROD/network/admin
    PATH=/u01/oracle/10g/PROD/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin
    ORACLE_HOME=/u01/oracle/10g/PROD
    LD_LIBRARY_PATH=/u01/oracle/10g/PROD/lib:/u01/oracle/10g/PROD/network/lib
    ORACLE_SID=PROD
    TNS_ADMIN=/u01/oracle/10g/PROD/network/admin
    PATH=/u01/oracle/10g/PROD/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin
    ORACLE_HOME=/u01/oracle/10g/PROD
    Linux sam 2.6.9-42.0.0.0.1.ELsmp #1 SMP Sun Oct 15 14:02:40 PDT 2006 i686 i686 i386 GNU/Linux
    When I do
    [oracle@sam ~]$ sqlplus / as sysdba
    -bash: sqlplus: command not found
    Can someone help me out here. Please let me know if you need further information, I have posted.

    Thanks for the help.

    -Sam

    ORACLE_HOME=/home/Oracle/Oracle/product/10.2.0/Db_1
    Export ORACLE_HOME
    PATH = $ORACLE_HOME/bin: $PATH
    export PATH

  • Missing ORACLE_HOME, SQLPLUS - bash: sqlplus: command not found

    OK, I'm a newbie, but a real difficulty with my G 10 DB I had implemented on Unix Solaris, but someone has been messing around with it, and now I can't see ORACLE_HOME, ORACLE_BASE and ORACLE_SID, they return all empty when I try to 'echo' of each.

    I realize I should have initially he set in Bash_profile, but now is too late.

    So, how can I set them back to the top, I can't get SQLPLUS / AS SYSDBA... bash: sqlplus: command not found

    I tried to reset and to export but still does not work.

    I got the ORACLE_BASE as:

    Training:/export/home/training/product/10.2.0/Db_1:N

    but, can't seem to define three variables to launch SQLPLUS, any ideas what I am doing wrong?

    Tried messing around to reset but nothing works, it's the current state of things:

    env

    SSH_TTY = / dev/pts/3
    USER = training
    ORACLE_SID = training
    ORACLE_BASE = / oracle/app
    PATH = / usr/sbin: / usr/bin
    PWD=/export/home/training/product/10.2.0/Db_1/bin
    TZ = Eire
    Ps1 = \e [33m\h\e [31 m-\u-\e [33m\W/\e [31 m-$\e [32 m]]]]
    SHLVL = 3
    HOME = / export/home/training
    LOGNAME = training
    ORACLE_HOME=/Oracle/app/product/10.2.0


    Can someone help me, really need a step by step guide to set these back up correctly.

    Thank you

    ORACLE_HOME=/export/home/training/product/10.2.0/Db_1
    $PATH = path: $ORACLE_HOME/bin
    export ORACLE_HOME PATH

  • Not able to access sqlplus command-line linux for the new user added

    Hi all

    We have a strange problem with a new user of linux Redhat , trying to to connect to Oracle 10 g from the command line and would like any suggestions you have.

    -other users are able to connect via sqlplus fine to their respective Oracle accounts, both for the new user account.
    -I know the user and the password works because we can connect through Oracle SQL Developer from a terminal Windows.

    -----

    The monitoring of symptoms:

    Since terminal linux+:

    [user@server]$ sqlplus
    Error Initializing SQL 6 * more
    SP1 file < lang > .msb not found message
    SP2-0750: you may need to set ORACLE_HOME in your Oracle software directory

    [user@server]$ echo $ORACLE_HOME
    / opt/oracle/10 g

    [user@server]$ echo $ORACLE_SID
    ~ also define as in other users without db connection problems

    [user@server]$ pico * .bash_profile]
    ~ the value as in other users without db connection problems

    [user@server]$ testconnection.pl perl

    Series of tests in connection...

    ORA_HOME: "/ opt/oracle / 10g.
    AMERICAN

    DBI connect('local.domain.name','db_username',...) failed: ERROR OCIEnvNlsCreate (check ORACLE_HOME and NLS parameters etc.) to the line /www/testconnection.pl 21
    has failed: ERROR OCIEnvNlsCreate (check the ORACLE_HOME and NLS parameters etc).


    [user@server]$ pico testconnection.pl

    ! / usr/bin/perl

    Use DBI;

    $this_var [0] = "dbi:Oracle:local.domain.name";
    $this_var [1] = 'db_username ';
    $this_var [2] = 'db_password ';

    print 'Test Run of connection...\n\n';
    print ' ORA_HOME: '$ENV {ORACLE_HOME}' \n ";
    print ' NLS_LANG: '$ENV {NLS_LANG}' \n ";
    Print "ORA_NLS: '$ENV {ORA_NLS}' \n ';"
    Print "\n\n";

    #connect DB
    $dbh = DBI-> connect ($this_var [0], $this_var [1] $this_var [2]);
    {if ($DBH)}
    Print "OK \n";
    $dbh-> disconnect;
    }
    else {}
    Print "failed: $DBI: errstr\n";
    }


    Thanks for your help!

    >
    [user@server]$ ls - lt /opt/oracle/10g/sqlplus/mesg/sp*.msb
    -rw - r - 1 oracle oinstall 31744 Sep 2005 1 /opt/oracle/10g/sqlplus/mesg/sp2us.msb
    -rw - r - 1 oracle oinstall 11776 Sep 2005 1 /opt/oracle/10g/sqlplus/mesg/sp1us.msb
    >

    It seems that if you have a permissions problem. If your username is not a member of the oinstall group, he or she has no access to the necessary sql * more files. I recommend you read MOS 420083.1 Note for a more in-depth discussion to set the file permissions on the Oracle home.

  • sqlplus command inside batch files

    Hello

    Oracle9.2

    need commands from sqlplus, from the inside, the batch files without calling the file .sql separately. How can we do?

    Regarding

    Hello

    You can more orders in this code, but no select statements do not work here. Please provide your batch file as I'll be able to check the same.

    (
      echo alter database backup controlfile to trace;;
      echo shutdown immediate;
      echo exit
    )|sqlplus -s "sys/%password%@%tnsname% as sysdba" > Shutdown.log
    

    See you soon
    LIX.

    Published by: Kanchana dewaer on February 10, 2011 12:43

  • Select the sqlplus command

    Hello

    We have our first database Oracle here, and I found a few problems with sqlplus.

    When I run a select command to list the rows in a table that contains 567 lines, I have a great response and I'm not able to see the first columns...
    I would like to know how I can get the answer page by page...
    Is this possible?

    Eduardo

    And also:

    set pause on
    

    : p

  • A question about the REEL in sqlplus command

    Hi all


    I have a question about the order of the COIL and I would be grateful if you could kindly give me a helping hand. Consider the following sql script.
    SPOOL result.txt
    SELECT * FROM mytable;
    SPOOL OFF;
    It works pretty well, and all the contents of the table "MyTable" is exported to the textfile "result.txt". However, sqlplus also prints the number of lines
    Print after each query. So after you run this script, the end of the file, I always have a line like
    ...
    "20541 lines returned"
    How can I avoid this line (the number of returned rows) in my output file?


    Thanks in advance,
    Dariyoosh

    Type this command prior to winding.

    set feedback off
    

    Kind regards
    Prazy

  • sqlplus command is not found

    System:

    Oracle DB: 11.2.0.3.0

    Linux: Red Hat 5.11

    Problem. I am creating the table space, and I get the following error:

    sqlplus_command_not_found_in_my_path.png

    I signed as user ORACLE

    It's the command that I am running:

    $./create-tablespace.sh system ic_default 0racle GIVEN 200M ic_event + DATA DATA 800M + 800M ic_event_idx

    How can I add Oracle home on my road?

    I tried more earlier, but it did not work:

    export PATH = $PATH: $ORACLE_HOME/bin

    [DB01: / tmp/database] $ echo $PATH

    / usr/Kerberos/bin: / usr/local/bin: / bin: / usr/bin: / home/oracle/bin: / bin: / GGstore/goldengate: / bin

    When I do: $ echo $ ORACLE_HOME

    I have a blank line.

    Would this work?

    export ORACLE_HOME=/opt/oracle/product/11.2.0/bin

    I don't want to change anything permanently, I want to just put the path so I can run the command to create the workspace.

    Thanks for your help.

    First of all, the only true command that you show us is where you call a shell script and the error in the shell script.  You ask us to debug code that you don't show us.

    Second

    "When I do: $ echo $ ORACLE_HOME.


    remove the space between "$" and "ORACLE_HOME.

    Third

    I was thinking of doing this

    Export ORACLE_HOME = /opt/oracle/product/11.2.0

    export PATH = $PATH: $ORACLE_HOME/bin


    remove the spaces around the '='.

    Finally, you need to do in the script that we cannot see is:

    export ORACLE_SID=nameofyourdatabaseaslistedintheoratabfile
    export ORAENV_ASK=NO
    . oraenv     #<<< that's 'dot space oraenv'
    

    Who will use oraenv to correctly set the path, ORACLE_HOME, LD_LIBRARY_PATH, and perhaps others I forgot.

    In regards to your concerns about the 'permanent' setting the variables... they are NEVER definitively defined.  All environment variables exist only within a given session.  Some may appear permanent because they are defined by the/etc/rc.profile, ~ /. RC.profile and ~/.bash_profile when you connect.  Something else that you define, in will be for sure, only the session in which put you them.

  • The update of bridge CC (2015) breaks the command "Reveal in Bridge" InDesign

    We have several Macs and PC running creative cloud. To date on OSX / Win10.

    The bridge was last updated break the revelation at the head of bridge InDesign, which is an integral part of our workflow.

    Instead he throws to the creative cloud app - suggesting that she tries to find the old version rather than the new version as a direct replacement.

    Hi Michael,

    InDesign came out with an updated ID CC 2015.4.1 the last morning...
    This patch has fixes for InDesign - bridge workflow
    I recommend you to get this last update, it will show in your desktop creative cloud Application. Try this and let me know if you are able to solve the problem...

    Thanks in advance...

    Concerning
    Monica Singh
    InDesign team

  • bash: sqlplus: command not found - Oracle Linux 6.5

    Hi all

    Thanks for all the people for supporting me for several days in the past.

    I met another problem.

    1. Installed Linux 6.5 on 3 machines
      1. VSS-DB-SERVER
      2. VSS-OTM-SERVER
      3. VSS-BI-DB-SERVER
    2. The VSS-DB-SERVER installed Oracle 11 g DB. (Able to access any part of the world by SqlDeveloper) $ORACLE_HOME is perfectly set and the database is running
    3. VSS-OTM-Server I installed the below in the respective order successfully.
      1. JRocket
      2. WebLogic Server
      3. OSH
      4. OTM 6.3 (no FTI)

    This is where I am facing the problem.

    This server how to use sqlplus / as sysdba

    As I need to perform a certain activity post installation.

    I don't know if this is the right forum, but I don't know that this forum has a lot of capable people, let me know if I have to go to another forum

    Thank you

    Vishwamber Shetty

    Why are you trying to run sqlplus on a server that is not running the database? Just run it on the database server. However, if you really need to run sqlplus on another machine, you must install it. Look for the Oracle Instant Client and install the Basic and SQL * Plus packages to get the client works. You will need to use the forum of the database for more information on how to set this up, however.

  • SQLPlus command line history

    Hello!
    Is it possible to have a history of orders (navigated by keyboard keys cursor UP/DOWN) in SQLPlus?

    On Linux/Unix, install the package rlwrap and launch sqlplus as: rlwrap sqlplus user@your_database

Maybe you are looking for

  • I've never done a Time Machine backup and I have upgraded to iOS Sierra. Help!

    I'm a fool. After owning my Macbook for 5 years, I failed to make a single Time Machine backup. I just saved my essential to an external hard drive. I have upgraded to iOS Sierra. Big mistake. I want to go back to iOS Capitan, but it does not seem po

  • Is anyone else receives this message from Livestream?

    In the Firefox browser, I see this message from the player."Channel owner forbade the display this channel from this web page.Here is the link to the page: http://www.Packers.com/Media-Center/live-webcasts.html IE and Chrome do not show this message.

  • Cannot view bookmark bookmark hotmail (used to)

    from the homepage, I can access a favorite site... but when I try to move from this site (any site favorite) on my favorite site of Hotmail (which is my homepage site), always "expires" and do not make the connection at the back... This is not used a

  • Photo Album vs iPhoto event

    I always prefer iPhoto Photos but because at some point, I'm sure he will be eliminated, I strive gradually switch to the pictures. One thing really miss me is the iPhoto EVENTS. I can almost do the same thing by creating albums, but one thing miss m

  • DeskJet 2540 all in one print a few pages and then stop saying printer error

    I'm on windows 8.1 x 64, I use office 2013 pro, I had this problem for some time and now I'm getting really annoyed that there is no solution for it, yet I have searched several sites and forums and nothing. I'm in the middle trying to print somethin