Any one please tell me How to use triggers in sqlite using C...
--
With Regards,
*Bageesh.M.Bose*
**
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Can anyone tell How to use Triggers in Sqlite using C
--
With Regards,
*Bageesh.M.Bose*
**
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 14 Jun 2012, at 22:16, Udi Karni wrote:
Is there a way to run SQL scripts in the Shell with parameters?
Something like this?
set YEAR = 2010
SELECT COUNT (*) FROM TABLE WHERE YEAR = YEAR ;
???
I use bash and sqlite3, as in the fragment below.
#!/bin/bash
# query-script
Niall - thanks. If I understand correctly - you use bash to do the
preprocessing of the substitutions and submit the prepared statements to
Sqlite.
On Fri, Jun 15, 2012 at 1:48 AM, Niall O'Reilly niall.orei...@ucd.iewrote:
On 14 Jun 2012, at 22:16, Udi Karni wrote:
Is there a way to run SQL
Hi all,
Is the algorithm used in the stemming tokenizer in SqLite's fts extension
equivalent to the C implementation found at
http://tartarus.org/~martin/PorterStemmer/
?
I am asking this because some sources say that there are improved versions of
this algorithm released much later than
On Fri, Jun 15, 2012 at 11:59:33AM +0530, Bageesh.M.Bose wrote:
Can anyone tell How to use Triggers in Sqlite using C
Triggers in SQLite can only contain SQL DML statements. But, you can
interface with C by defining functions, then calling those functions
using SQL SELECT command.
For
select * from hbc order by cmc desc limit 10
union
select * from hbc where qph0
union
select * from hbc where hctl=1
this sql cmd cause the error:
order by clause should come after union not before
___
sqlite-users mailing list
On Thu, Jun 14, 2012 at 06:27:17AM -0400, Richard Hipp wrote:
On Thu, Jun 14, 2012 at 2:41 AM, vallur raghava reddy
vallur.raghavare...@gmail.com wrote:
2. Does SQLite create a any threads? If YES, how many will be created?
SQLite does not create threads.
Except when the
On 15 Jun 2012, at 10:45, Udi Karni wrote:
Niall - thanks. If I understand correctly - you use bash to do the
preprocessing of the substitutions and submit the prepared statements to
Sqlite.
Well, 'prepared' is not the term I would use, as it has a specific
meaning in the
Hi, all!
Final reminder! Please get in touch soon if you wish to partake. We still
have plenty of slots free...
@Those who have gotten in touch: i will send you the exact address and
whatnot within the next two weeks. The timeframe is not yet set, but i
expect it will be more or less a full-day
On Fri, Jun 15, 2012 at 5:51 AM, Philip Bennefall phi...@blastbay.comwrote:
Hi all,
Is the algorithm used in the stemming tokenizer in SqLite's fts extension
equivalent to the C implementation found at
http://tartarus.org/~martin/PorterStemmer/
The built-in Porter stemmer is a copy/paste
Thanks, Richard. That's good to know because I am trying to decide whether to
add a new tokenizer with some custom processing, as opposed to using the built
in stemmer.
Kind regards,
Philip Bennefall
- Original Message -
From: Richard Hipp
To: phi...@blastbay.com ; General
On 15 Jun 2012, at 10:56am, YAN HONG YE yanhong...@mpsa.com wrote:
select * from hbc order by cmc desc limit 10
union
select * from hbc where qph0
union
select * from hbc where hctl=1
this sql cmd cause the error:
order by clause should come after union not before
Yes. The UNION
On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE yanhong...@mpsa.com wrote:
select * from hbc order by cmc desc limit 10
union
select * from hbc where qph0
union
select * from hbc where hctl=1
this sql cmd cause the error:
order by clause should come after union not before
Could the SQLite code add a new dummy function for a callback which we can then
override with our own library?
That would provide an easy-to-use interface which would then still work in the
shell (unless you're doing some other database functions inside the callback --
coider beware).
e.g.
On 15 Jun 2012, at 5:32am, Etienne ejlist-sql...@yahoo.fr wrote:
That said... the rounding error ITSELF is not the point.
The problem is: the real rounding error depends here on the shell (SQLite
or JSDB) calling the SQLite library.
Yes. Different languages use different ways to hide the
I use Ruby. In the following example I use a replacement tag #{lvl} in
the scripts. For each of the levels (indv,hhld,resi), I do a substitution
against the script and pass the script to sqlite.
dbname =
File.join('d:','cloveretl','projects','test_ii','data-out-97','test.db')
db =
On Fri, Jun 15, 2012 at 12:12:22PM +, Black, Michael (IS) scratched on the
wall:
Could the SQLite code add a new dummy function for a callback which
we can then override with our own library?
Just use an SQL function:
http://sqlite.org/c3ref/create_function.html
-j
--
Jay A.
On Fri, Jun 15, 2012 at 08:10:20AM -0400, Kevin Benson scratched on the wall:
On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE yanhong...@mpsa.com wrote:
select * from hbc order by cmc desc limit 10
union
select * from hbc where qph0
union
select * from hbc where hctl=1
this sql cmd
But as somebody pointed out if you muck with database from the shell or any
other program it will die with function not found if the trigger is called.
Ergo a dummy function to make it happy and non-fatal.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT
I had another quick question. If I have built an fts table using the stemmer
tokenizer, and then I later decide that I want to change to the simple one, is
there an easy way to do this? I see the rebuild command, can I somehow tell
that to change the tokenizer as well? I see the reference to
YAN HONG YE yanhong...@mpsa.com wrote:
select * from hbc order by cmc desc limit 10
union
select * from hbc where qph0
union
select * from hbc where hctl=1
this sql cmd cause the error:
order by clause should come after union not before
select * from hbc where rowid in (select rowid
On Fri, Jun 15, 2012 at 9:00 AM, Philip Bennefall phi...@blastbay.comwrote:
I had another quick question. If I have built an fts table using the
stemmer tokenizer, and then I later decide that I want to change to the
simple one, is there an easy way to do this? I see the rebuild command,
can
Black, Michael (IS) michael.bla...@ngc.com wrote:
Could the SQLite code add a new dummy function for a callback which we can
then override with our own library?
sqlite3_update_hook
--
Igor Tandetnik
___
sqlite-users mailing list
Bageesh.M.Bose bageesh...@gmail.com wrote:
Can anyone tell How to use Triggers in Sqlite using C
What do you mean by use triggers, exactly? What are you trying to achieve?
If you are asking how to create a trigger, then it's the same way as creating a
table - you open a database connection
I understand that, but let's say that I already have a virtual fts table
created that I set to use the Porter tokenizer, how then would I go about
rebuilding and retokenizing this table with the simple tokenizer at a later
time? Would I need to create an entirely new table? What I'm wondering
Looks like that is getting close...but when is this called? BEFORE or AFTER?
And you also wouldn't know which trigger got calledonly which table was
touched.
The dummy function would solve both those problems.
So I can still see an sqlite3_callback() either overloaded or a function
On Fri, Jun 15, 2012 at 9:26 AM, Philip Bennefall phi...@blastbay.comwrote:
I understand that, but let's say that I already have a virtual fts table
created that I set to use the Porter tokenizer, how then would I go about
rebuilding and retokenizing this table with the simple tokenizer at a
Understood. Thank you very much for your quick help. Now I have all the
information I need to get coding. And thanks once again for a great library!
Kind regards,
Philip Bennefall
- Original Message -
From: Richard Hipp
To: phi...@blastbay.com ; General Discussion of SQLite
Black, Michael (IS) michael.bla...@ngc.com wrote:
Looks like that is getting close...but when is this called? BEFORE or AFTER?
After, as far as I can tell.
--
Igor Tandetnik
___
sqlite-users mailing list
sqlite-users@sqlite.org
On Fri, Jun 15, 2012 at 12:42:45PM +, Black, Michael (IS) scratched on the
wall:
But as somebody pointed out if you muck with database from the shell or
any other program it will die with function not found if the trigger
is called.
Ergo a dummy function to make it happy and non-fatal.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 15/06/12 03:01, Christian Smith wrote:
Except when the asynchronous IO module is used:
http://www.sqlite.org/asyncvfs.html
This VFS module will create a single background IO thread.
No it doesn't. You have to create the thread for the
On Fri, Jun 15, 2012 at 06:32:51AM +0200, Etienne scratched on the wall:
The problem is: the real rounding error depends here on the shell
(SQLite or JSDB) calling the SQLite library.
This shouldn't be a surprise. The core SQLite API is expecting a
64-bit binary number. That's what goes
The problem is: the real rounding error depends here on the shell (SQLite
or JSDB) calling the SQLite library.
Yes. Different languages use different ways to hide the fact that they can't
hide the 0.1.
The difference of languages is irrelevant here.
Both shells call SQLITE_API const
SQLite does not create the thread.
The application creates the thread and then runs the async writer on that
application created thread.
---
() ascii ribbon campaign against html e-mail
/\ www.asciiribbon.org
-Original Message-
From: sqlite-users-boun...@sqlite.org
select *
from (select *
from hbc
order by cmc desc
limit 10) as ss
union
select *
from hbc
where qph0
or hctl=1;
---
() ascii ribbon campaign against html e-mail
/\ www.asciiribbon.org
-Original Message-
From:
Etienne ejlist-sql...@yahoo.fr wrote:
R:\sqlite NUL select 0.1;
0.1
JSDB (www.jsdb.org) output:
jsvar db = new SQLite();
jsdb.exec(select 0.1, function(r){writeln(r)});
0.1=0.11
true
You are not doing the same thing both times. One time you are writing the
I have a sql file, and I know in sqlite use .read my.sql to run sql cmd,but I
don't know how to run the sql file in c++?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On 16 Jun 2012, at 3:01am, sohu y...@sohu.com wrote:
I have a sql file, and I know in sqlite use .read my.sql to run sql cmd,but I
don't know how to run the sql file in c++?
There is no way to do it in one command. You can write your own C++ code to
read the text file one line at a time
Simon Slavin slav...@bigfraud.org wrote:
On 16 Jun 2012, at 3:01am, sohu y...@sohu.com wrote:
I have a sql file, and I know in sqlite use .read my.sql to run sql cmd,but
I don't know how to run the sql file in c++?
There is no way to do it in one command.
Well, for a reasonably sized
40 matches
Mail list logo