🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.bazy-danych
Article #183223

Oracle sqlplus i nazwa pliku jako zmienna

#183223
From: Jakub Sochacki
Date: Tue, 30 Jun 2009 16:14
14 lines
1230 bytes
Chciałbym uruchomić z sqlplusa plik, którego nazwę mam w zmiennej.
Próbowałem jak poniżej, ale w poleceniu START zmienna nie jest 
zastępowana, tylko traktowana jako literał. Jakieś pomysły?

VARIABLE db_version VARCHAR2(60);
VARIABLE patch_file VARCHAR2(40);

exec :db_version := 'current database version is: '||database_version();
exec :patch_file := 'patches/'||database_version()||'.sql';

print db_version;
print patch_file;

start patch_file;
Technical Details
Message-ID: <h2dcjc$dnd$1@news.interia.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!not-for-mail
From: Jakub Sochacki <soshi@poczta.fm>
Newsgroups: pl.comp.bazy-danych
Subject: Oracle sqlplus i nazwa pliku jako zmienna
Date: Tue, 30 Jun 2009 18:14:51 +0200
Organization: INTERIA.PL S.A.
Lines: 15
Message-ID: <h2dcjc$dnd$1@news.interia.pl>
NNTP-Posting-Host: 87-205-232-68.adsl.inetia.pl
Mime-Version: 1.0
X-Trace: news.interia.pl 1246377388 14061 87.205.232.68 (30 Jun 2009 15:56:28 GMT)
X-Complaints-To: usenet@news.interia.pl
NNTP-Posting-Date: Tue, 30 Jun 2009 15:56:28 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
X-Authenticated-User: soshi % poczta+fm
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit