Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: please someone help me with sql

Re: please someone help me with sql

From: Marco Blanco <mblanco_at_performance2000.net>
Date: Mon, 16 Sep 2002 17:33:04 +0200
Message-ID: <3d85fb3f$1_2@news.arrakis.es>


try this.

file test.sql

set head off
set verify off
set feedback off

var a number

begin
select count(*) into :a from user_verwaltung where sicherungs_art=1 and geloescht_am is null;
end;
/

spool file.lst
select :a from dual;
spool off

exit

Run this sql script in this way.

$ORACLE_HOM/bin/sqlplus user/password_at_connect_string @file

Marco.

"M. Gedecke" <spam_at_gedecke.de> wrote in message news:am4ntc$k3s$1_at_redenix.uni-muenster.de...
> i want to create an empty file which has the name of the content of a
> variable and an ending. i thought of something like that:
>
> variable a number
> a:=select count(*) from user_verwaltung where sicherungs_art=1 and
> geloescht_am is null;
> spool 'variable a'.sve';
> spool off
>
> could someone please help me with the syntax of the commands? the name of
> the file should be something like: 23.sve
>
> thanx
>
> max
>
>
Received on Mon Sep 16 2002 - 10:33:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US