On Thu, 10 Oct 2013 16:27:21 +0200
Stephan Beal wrote:
> > (echo .separator "||"; echo .import path tbl) | sqlite3 dbfile
> >
>
> Alternately, most Unix shells allow:
>
> echo -e ".separator '[||'\n.import ..."
>
> the -e enables the conventional set of backslash escapes.
We're OT here, but
(echo .separator "||"; echo .import path tbl) | sqlite3 dbfile
worked perfectly. Thank you Clemens, Stephan and Simon for the ideas. I
learned a bunch of new things today.
John
On Thu, Oct 10, 2013 at 10:18 AM, Clemens Ladisch wrote:
> John wrote:
> > I am having problems creating a
On 10 Oct 2013, at 3:02pm, John wrote:
> Combining .commands does NOT work:
>
> do shell script ("sqlite3 " & databasePath & " .separator \"||\" ; .import
> path/to/csv Main")
> -
>
> Is my syntax wrong or can .commands not be included in
On Thu, Oct 10, 2013 at 4:18 PM, Clemens Ladisch wrote:
> If you cannot generate newline characters, try to execute something
> like this:
>
> (echo .separator "||"; echo .import path tbl) | sqlite3 dbfile
>
Alternately, most Unix shells allow:
echo -e ".separator '[||'\n.import ..."
the -e
John wrote:
> I am having problems creating a "do shell script" command which includes
> both the import command and the insert command. The reason they need to be
> combined is that the shells instance ends with the command.
>
> do shell script ("sqlite3 " & databasePath & " .separator \"||\" ; .
I have a fairly long AppleScript that I creates a csv file which then needs
to be imported into a database. I am trying to use the .import command from
AppleScript's "do shell script" command to import a csv file into a
temporary table. I then need to import the temporary table into the Main
table
6 matches
Mail list logo