Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I run many scripts under a path with SQL*PLUS?
<caifan01_at_gmail.com> wrote in message
news:1164124559.304639.77290_at_f16g2000cwb.googlegroups.com...
> Using SQL*PLUS I'm trying to run a set of scripts which are under a
> certain path.
>
> The problem is that I may not know how many are them and I won't know
> the names of the .sql files.
>
> Do you know if there is a way that '@' command accepts a directory and
> runs all the .sql files inside the directory?
You can do it in shell:
for file in *.sql; do
printf "%s\n" "@${file}"
done | sqlplus user/pass
Regards
Dimitre
Received on Tue Nov 21 2006 - 10:03:13 CST