Hello,

thanks, 2nd is working.

i do in perl now something like:

$exe="/usr/bin/sqlite3 mydb.db <<EOT
.load /usr/lib/sqlite3/pcre.so
select * from a where field1 REGEXP '$foo';
EOT";
$myresult=`$exe`;

and got my needed data.

thanks,
Hajo

----- Original Message ----- From: "Kit" <kit.sa...@gmail.com>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Thursday, January 05, 2012 1:11 PM
Subject: Re: [sqlite] load regexp noninteractive


echo "select * from a where field1 REGEXP '$foo';" | /usr/bin/sqlite3 mydb.db

/usr/bin/sqlite3 mydb.db <<EOT
select * from a where field1 REGEXP '$foo';
EOT


2012/1/5, Hajo Locke <hajo.lo...@gmx.de>:
Hello List,

i use sqlite 3.6.22 Ubuntu 10.04

I want to use REGEXP in my queries but dont find a way to load the lib in
noninteractive Mode.
There is no -load Parameter for sqlite3 Binary. I tried to give 2 commands
separated by ; in sql-query but this also dont works.
All i want to do is to run a query on console like:
/usr/bin/sqlite3 mydb.db "select * from a where field1 REGEXP '$foo';"

What to do now?

Thanks,
Hajo

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to