Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread venkat easwar
Hi, True. I will get rid of the habit of using double quotes for string literals. Thanks for information. But most of the databases support this non standard behavior. Thanks Venkat VENKAT From: Jean-Christophe Deschamps To: General Discussion of SQLite D

Re: [sqlite] How to Use an Apostrophe in a Text Field?

2011-04-21 Thread venkat easwar
The apostrophes are escaped by apostrophes. One more way you can do. insert into () values ("*Goin' Down >> the Road Feelin' Bad*"); It is double quotes before and after *. Similarly double quotes will be escaped by one more double quote VENKAT From: Jim

Re: [sqlite] insert statement using temp variable

2011-04-04 Thread venkat easwar
Hi, Very simple, What will be the output of printf("i"); it won't be 0 right? use snprintf or sprintf and formulate the string then execute the query. int i=0; char * a[100]; snprintf(a,100,"insert into emp values(%d);",i); /or /*sprintf(a,"insert into emp values(%d);",i);*/ rc = sqlite3_exec(

Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread venkat easwar
Oh... Thanks Kennedy. Between any options on run time to enable the feature? VENKAT From: Dan Kennedy To: sqlite-users@sqlite.org Sent: Tue, February 15, 2011 4:48:24 PM Subject: Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR On 02/15/2011 06:04 PM, venkat

Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread venkat easwar
e check_update set b='venkat n' where b='venkat' order by a limit 1; support link: http://www.sqlite.org/syntaxdiagrams.html#update-stmt-limited VENKAT ____ From: venkat easwar To: General Discussion of SQLite Database Sent: Tue, February

Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread venkat easwar
Forgot to mention what error I am getting. near "order": syntax error near "limit": syntax error - if i remove the order by clause VENKAT ________ From: venkat easwar To: General Discussion of SQLite Database Sent: Tue, February 15, 201

[sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread venkat easwar
Hi Buddies, Sqlite support document says, update with limit and order by clauses are supported. But I found it actually not working. Sample DB schema, create table check_update( a int, b char); insert into check_update values (1,'venkat',22); insert into check_update values (2,'venkat',23); Now

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
Harish, Consider doing things outside sqlite. Definitely you should be using C API or php API or some other for making query to DB. Why don't you think of doing things outside sqlite VENKAT Bug the Bugs From: Harish CS To: sqlite-users@sqlite.org Sent: Mon,

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
Simon, As far as I am aware trim will remove the characters only in ends, not in the middle. Assume an input like "12venkatpw", this cannot be trimmed. Or am I wrong somewhere. Guess NO. Thanks VENKAT Bug the Bugs. From: Simon Slavin To: General Discussion

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
e 'ab' and enter '1234'. Thanks, Harish venkat easwar wrote: > > Well. I thought it should be an easy deal for you hence left that part. > Now > giving the conditioned trigger assuming the following condition. I leave > the > testing part to your concern. &g

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
27;,'7','8','9','*','#','+','p','w') begin update set B=new.A where A=new.A; end; If you find more bugs, well it is good, we will get them bugged. VENKAT Bug the Bugs From: venkat easw

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
;,'p','w') beginupdate set B=new.A; end; Missed set in my last mail. It would have given you a syntax error. VENKAT Bug the Bugs From: venkat easwar To: General Discussion of SQLite Database Sent: Mon, February 7, 2011 4:41:19 PM Subjec

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
,'+','p','w') beginupdate B=new.A; end; Only if the values inside the braces are inserted it will be copied to column B. VENKAT Bug the Bugs From: Harish CS To: sqlite-users@sqlite.org Sent: Mon, February 7, 2011 2:59:50 PM Su

Re: [sqlite] Trigger to filter out characters

2011-02-07 Thread venkat easwar
Hi Harish, Yes it is possible. Look below for solution. create trigger if not exists after insert on when new.A= begin update B=new.A; end; There is nothing tricky or hard for inserting into another table, same things should go. VENKAT Bug the Bugs Fro

Re: [sqlite] Help on DELETE FROM...

2011-01-17 Thread venkat easwar
Hi, This is something which will work in round robin fashion. I will suggest something like a trigger which will delete the older entries, when the table is updated with new data. There are some papers out for implementing rrd from sql. Google them, they should be helpful VENKAT Bug the

Re: [sqlite] Using local variables through sqlite

2011-01-10 Thread venkat easwar
Thanks Igor, I coded in the second syntax previously, but the first syntax looks good for me. I will use that one for my project. Thanks for helping me out guys. Cheers Venkat From: Igor Tandetnik To: sqlite-users@sqlite.org Sent: Sat, January 8, 2011 3:3