SQLitening Support Forum

SQLitening Support => You've got Questions? We've got Answers! => Topic started by: syahmicro on May 10, 2013, 04:46:18 PM

Title: Semicolon cannot terminate the statement
Post by: syahmicro on May 10, 2013, 04:46:18 PM
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table tbl1(char ,int );
...> insert into tbl1 values('kenneth,10);
...> ;
...>;
...>;

i installed sqlite on ubuntu 12.04 lts

i got this problem,as u can see from that statement i just
deliberate to dump the comma at 'kenneth.supposely when there have missing character such as comma it must be show the syntax error but then when need terminate the statement i could not work.I don't what is the problem because i was tried 2 times installing sqlite on ubuntu 12.04

so from this,i would like to make another coding to fix up this problem by using c programming
but then do you all have ideas to make coding?so we can access with sqlite using this command
gcc -o file file.c -lsqlite3

in sqlite,there are having files which is header file and c files.
sqlite3.c
shell.c
Title: Re: Semicolon cannot terminate the statement
Post by: Bern Ertl on May 10, 2013, 04:55:37 PM
It's quite possible that I didn't understand your note correctly, but...

Quote from: syahmicro on May 10, 2013, 04:46:18 PM
...
sqlite> create table tbl1(char ,int );
...> insert into artist values('kenneth,10);
...

Seems to me that you need to use the correct table name?
Title: Re: Semicolon cannot terminate the statement
Post by: syahmicro on May 11, 2013, 01:00:50 AM
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table tbl1(char ,int );
...> insert into tbl1 values('kenneth,10);
...> ;
...>;
...>;

oh sory for previous post that i was inserted wrong table name,but this is the correct one..as u can see the query there still got problem to terminate the program using semicolon.

for this problem i need to solve it,by the way i have a bit issue that how come this happened
Title: Re: Semicolon cannot terminate the statement
Post by: Paul Squires on May 11, 2013, 10:05:57 AM
Should there be a trailing single quote at the end of kenneth?   i.e.   'kenneth'

insert into tbl1 values('kenneth',10);