Re: [sqlite] Adding data with periods
Hi, Sqlite takes the period as a special character. Wherever you get a period ' make it as ''. This will make it as a normal character and will work fine. Hope the solution solves your problem. Regards, Kirrthana -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]on Behalf Of aditya siram Sent: Monday, December 15, 2008 10:35 AM To: sqlite-users@sqlite.org Subject: [sqlite] Adding data with periods Hi all, I'm having trouble adding data with period characters in it. I tries to escape the period with a `'` but that didn' t seem to work. Here is an example interaction: sqlite> create table test_table ("Contents" varchar); sqlite> insert into test_table "hello . world"; SQL error: near ""hello . world"": syntax error sqlite> insert into test_table "hello '. world"; SQL error: near ""hello '. world"": syntax error Thanks ... deech ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
RE: [sqlite] Getting the no of rows using count(*)
It works fine..Thanks.. Kirrthana -Original Message- From: Bharath Booshan L [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 12:07 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Getting the no of rows using count(*) Hello Kirrthana, > should i use prepare and step in this case and where the result of the query > will be stored on executing my c code. retValue = sqlite3_prepare( dataBaseConnection ,sqlQuery,-1,&ppStmt ,0); if( retValue != SQLITE_BUSY && (retValue = sqlite3_step( ppStmt ) == SQLITE_ROW ) { numOfRows =sqlite3_column_int64(ppStmt ,0); } sqlite3_finalize( ppStmt ); This should do it -- Bharath On 1/31/08 11:00 AM, "kirrthana M" <[EMAIL PROTECTED]> wrote: > Hi all, > > Im using the query Select count(*) from table to get the no of rows in the > table in my c code. > In the command line it will print the no of rows ,but in my c code how can i > get the result, > should i use prepare and step in this case and where the result of the query > will be stored on executing my c code. > > Regards > Kirrthana > > The information contained in this electronic message and any attachments to > this message are intended for the exclusive use of the addressee(s) and may > contain proprietary, confidential or privileged information. If you are not > the intended recipient, you should not disseminate, distribute or copy this > e-mail. Please notify the sender immediately and destroy all copies of this > message and any attachments contained in it. > > Contact your Administrator for further information. > --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus. - To unsubscribe, send email to [EMAIL PROTECTED] - The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information. - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Getting the no of rows using count(*)
Hi all, Im using the query Select count(*) from table to get the no of rows in the table in my c code. In the command line it will print the no of rows ,but in my c code how can i get the result, should i use prepare and step in this case and where the result of the query will be stored on executing my c code. Regards Kirrthana The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information.
[sqlite] Checking out the performance of sqlite3
Hi all, I just want to compare the performance of sqlite on various os and in embedded, Just want to know the time it takes to read and write data,can anybody give me a suggestion of how to do this. Regards Kirrthana The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information.
RE: [sqlite] sqlite3_exec function error:database is locked
You would have not closed the database after usage,just check wheather you have closed the database. -Original Message- From: varunkumar [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 09, 2007 9:25 PM To: sqlite-users@sqlite.org Subject: [sqlite] sqlite3_exec function error:database is locked i am using sqlite3 database in our project in my project one daemon process running , in this daemon process i am opening the data base and inserts the data in to sqlite3database using sqlite3_exec() API . for every one minute i am opening the database and inserts the values in to database using sqlite3_exec() API and closing the database. queryies are doing to database from another processes using sqlite3_exec() API . when query to database from another processes i am getting error "sqlite3_exec function error:database is locked " in above daemon process when this daemon process insert values in to database for that minute. from nextminute onwards this daemon process insert values in to database except when i query the database from another process. -- View this message in context: http://www.nabble.com/sqlite3_exec-function-error%3Adatabase-is-locked-tf459 5055.html#a13118299 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] - The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information. - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] beginner
In the sql query use AND operator for the two columns you want to compare. Ex:select * from table_name where col1=="value" AND col2 == "value"; -Original Message- From: nishit sharma [mailto:[EMAIL PROTECTED] Sent: Monday, September 03, 2007 3:41 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] beginner thanks for this help. i have done this... my another problem is that i have multiple columns in my database and on the basis of two columns( has integer values) i have to read the database. but i m unable to make a loop in C. can u help me. regards Nishit On 9/3/07, Pavan <[EMAIL PROTECTED]> wrote: > > You should link the library when you compile .It should be gcc > test.c-l > library name should be your sqlite shared library. Just check in /usr/lib > directory > > Thanks, > Pavan. > > > On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > hey buddy can u tell me how to compile the C source code in which i have > > used > > sqlite3_open() like calls. > > i m doing gcc test.c but it is giving me error of undefined reference. > > i think i am missing some thing in compiling. > > waiting for reply > > > > regards > > Nishit > > > > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > > > thanks for telling the link. > > > > > > regards > > > > > > > > > On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi Nishit, > > > > > > > > http://www.sqlite.org/quickstart.html > > > > > > > > This is a good link to start with. > > > > > > > > Thanks, > > > > Pavan. > > > > > > > > > > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi, > > > > > i m beginner to sqlite > > > > > can anybody send me a link which can help me > > > > > in building and maintining databse > > > > > > > > > > > > > > > > > > > > > -- > > > > ' > > > > Always finish stronger than you start > > > > * > > > > > > > > > > > > > > > > -- > ' > Always finish stronger than you start > * > The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information. - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] running code
Your test1.o with 2 arguments first will be the name of the database and the second will be some sql command to be executed. -Original Message- From: nishit sharma [mailto:[EMAIL PROTECTED] Sent: Friday, August 31, 2007 5:13 PM To: sqlite-users@sqlite.org Subject: [sqlite] running code here i am attaching a code can anyone tell me how to run this code. waiting for reply The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information.
RE: [sqlite] compiling
I think you have not included header file "sqlite3.h" in your code,if u have not included include and compile again. -Original Message- From: nishit sharma [mailto:[EMAIL PROTECTED] Sent: Friday, August 31, 2007 12:45 PM To: sqlite-users@sqlite.org Subject: [sqlite] compiling hi all, i have made a sampe which is opening a database file but i m unable to compile that source code and getting error that undefined reference to sqlite3_open(). i m compiling as gcc test.c can anybody tell that these is the command to compile sqlite3 application or we have any other command waiting for reply regards Nishit The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it. Contact your Administrator for further information. - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] command
Update can be used to replace a text with some new text. To delete a particular row use 'where' command along with 'delete'. -Original Message- From: nishit sharma [mailto:[EMAIL PROTECTED] Sent: Thursday, August 30, 2007 4:04 PM To: sqlite-users@sqlite.org Subject: [sqlite] command i have given some text in a database file as America|england| and many more. now i want to replace some text with new text how this is possible. Also my database has around 15 rows now which will be incremented. so, plz anyone tell me how to replace a text in a row and how to delete a particular row. waiting for response regads Nishit This message (including any attachment) is confidential and may be legally privileged. Access to this message by anyone other than the intended recipient(s) listed above is unauthorized. If you are not the intended recipient you are hereby notified that any disclosure, copying, or distribution of the message, or any action taken or omission of action by you in reliance upon it, is prohibited and may be unlawful. Please immediately notify the sender by reply e-mail and permanently delete all copies of the message if you have received this message in error. - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] Copying the content of a table to another table
Thanks i ll check it out.. -Original Message- From: Lloyd [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 1:37 PM To: Kirrthana M Cc: sqlite-users@sqlite.org Subject: Re: [sqlite] Copying the content of a table to another table create table x(c1 number,c2 number); create table y(v1 number,v2 number,v3 number,v4 number); insert into y (v1,v2) select c1,c2 from x; or better you can use the alter table command on your old table (here x) alter table x add v3 number; alter table x add v4 number; the following way doesn't seem to work for me alter table x add (v3 number,v4 number); Regards, Lloyd On Tue, 2007-06-05 at 11:25 +0530, Kirrthana M wrote: > Hi all, > I have created a table with two columns c1 and c2 and inserted some > values into,in future i may include some additional columns c3,c4. to > the same table.In tat case i should not loose my data in the current > table,so i should be able to copy the content of the current table(values of > c1 and c2) to the new table and start working with the new table and delete > the existing one,could anybody give me a suggestion for doing this. > > Regards > Kirrthana __ Scanned and protected by Email scanner - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Copying the content of a table to another table
Hi all, I have created a table with two columns c1 and c2 and inserted some values into,in future i may include some additional columns c3,c4. to the same table.In tat case i should not loose my data in the current table,so i should be able to copy the content of the current table(values of c1 and c2) to the new table and start working with the new table and delete the existing one,could anybody give me a suggestion for doing this. Regards Kirrthana
RE: [sqlite] retrieving data from multiple tables
By getting the search string from previous table im not only retrieving data from the table4,at each step i have to retrieve data from 3 tables and store it in the data structure. -Original Message- From: T&B [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 3:35 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] retrieving data from multiple tables Oops, I meant: CREATE VIEW MyTables AS SELECT Field1 AS MyField, otherFields1 FROM MyTable1 UNION ALL SELECT Field2, otherFields2 FROM MyTable2 UNION ALL SELECT Field3, otherFields3 FROM MyTable3 UNION ALL SELECT Field4, otherFields4 FROM MyTable4; > and thereafter simply query it as if it is one big table: > > SELECT * FROM MyTables WHERE MyField is desiredValue; - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] retrieving data from multiple tables
I have four tables like Mytable1,Mytable2,Mytable3,Mytable4 Mytable1 and Mytable2 have one similar field rest al different, Mytable2 and Mytable3 have one similar field rest al different, Mytable3 and Mytable4 have one similar field rest al different, i have to select from four tables by matching with all these field. -Original Message- From: T&B [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 12:44 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] retrieving data from multiple tables Hi Kirrthana, > I have created a database with four tables,i have to search and > retrieve > data from all the four tables based on the entry i get from the > previous > table and display all the entries,could anybody tell how to do it. I'm not sure what you mean. If you mean you have four tables with similar fields, and you want to SELECT data from all of them at once, then you can create a dynamic compound table that will contain all the data, and SELECT from that. eg: CREATE VIEW MyTables AS SELECT * FROM MyTable1 UNION ALL SELECT * FROM MyTable2 UNION ALL SELECT * FROM MyTable3 UNION ALL SELECT * FROM MyTable4; SELECT * FROM MyTables WHERE ; Or, if you mean that the result of SELECTing in one table becomes the basis of the SELECT in the next, that is something like the sequence: value1 = SELECT ResultField1 FROM MyTable1 WHERE SearchField1 = ; value2 = SELECT ResultField2 FROM MyTable2 WHERE SearchField2 = ResultField1; value3 = SELECT ResultField3 FROM MyTable3 WHERE SearchField3 = ResultField2; value4 = SELECT ResultField4 FROM MyTable4 WHERE SearchField4 = ResultField3; Then I think you could do it in one action by: SELECT ResultField4 FROM MyTable1 LEFT JOIN MyTable2 ON SearchField2 = ResultField1 LEFT JOIN MyTable3 ON SearchField3 = ResultField2 LEFT JOIN MyTable4 ON SearchField4 = ResultField3 WHERE SearchField1 = ; Tom - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] retrieving data from multiple tables
Hi all, I have created a database with four tables,i have to search and retrieve data from all the four tables based on the entry i get from the previous table and display all the entries,could anybody tell how to do it. Regards Kirrthana
[sqlite] Sqlite3 in MAC Os
Hi everybody, Im developing an application using sqlite3 in MAC OS,I just wanted to know wheather sqlite3 can be used in MAC OS.If so can the same sqlite3 library and the executable used in windows can be used in MAC OS or a different version has to be used. Regards, Kirrthana
[sqlite] Usage of special characters in insert query
Hi, In my query for inserting values into the database i have a statement as given below insert into table_name values('I haven't done that'); table is created with this option create table table_name(str varchar(20)); when the insert statement is executed it gives the error in haven't,It is working fine if i remove the apostrophe, but my input string will contain the apostrophe.. Give me a suggestion for rectifying this.... Thanks, Kirrthana
[sqlite] how to use the query select with sqlite3_exec
Hi, Im new to sqlite,i have written a program to create a table and perform the following operations Insert,Delete,search. To perform a search i used the query SELECT along with sqlite3_exec..Execution is successful but the result is not displayed in the screen.how to retrieve the result.Give me a suggestion. Thanks, Kirrthana