Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: please someone help me with sql
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
![]() |
![]() |