[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sqlite-users
Subject:    Re: [sqlite] How to invoke successive SQLite script files
From:       Kees Nuyt <k.nuyt () zonnet ! nl>
Date:       2010-07-15 21:07:27
Message-ID: autu36hngo7uv4cjeqn7fudfl8s4inhcm5 () dim53 ! demon ! nl
[Download RAW message or body]

On Thu, 15 Jul 2010 19:14:20 +0000 (UTC), ca44@comcast.net
wrote:

>
>
>Thanks Kees for your response. 
>
>I tried embedding the ".read" command into my sql script files and it appears to work fine. 
>
>
>
>One thing I don't like is having to specify the
>full path (relative to where I'm invoking SQLite3 from)
>to each file I reference in the scripts I invoke with ".read". 
>
>Is there a way to set a temp variable in a script file that I can use to specify a file path? 
>Then I could use that temp var in the file path. 

No.
But you can make your script directory the current
directory, first:

cd /path/to/scriptdir
sqlite3 /path/to/database/dbfile <script-A >/path/to/outfile

scriptA:
:
.read script-B

etcetera

-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic