Results 1 to 7 of 7

Thread: Semicolon cannot terminate the statement

  1. #1
    Join Date
    Mar 2013
    Beans
    45

    Semicolon cannot terminate the statement

    I have succesfully compile the sqlite-amalgamation-3071300 and extract the file.After that I compile the sqlite3.c into the SBC TS-5500.When execute the sqlite command,it show no response with the next line,anyone can help me solve this problem?

    SQLite version 3.7.13 2012-06-11 02:05:22
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> create table artist (ID INTEGER PRIMARY KEY,Artist_name TEXT);
    ...> insert into artist values(NULL,'hong');
    ...> select * from artist;
    ...> .quit
    ...>

  2. #2
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,675
    Distro
    Ubuntu

    Re: Semicolon cannot terminate the statement

    How strange ... I copied and pasted from your post and it worked OK. This is the standard install of SQLite on Precise (12.04).

    Code:
    $ sqlite3 temp.sqlite
    SQLite version 3.7.9 2011-11-01 00:52:41
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite>  create table artist (ID INTEGER PRIMARY KEY,Artist_name TEXT); 
    sqlite> insert into artist values(NULL,'hong'); 
    sqlite>  select * from artist; 
    1|hong
    sqlite> .quit
    Long shot: What keyboard layout and character set are you using?

    What happens with the standard install version of SQLite?
    Please create new threads for new questions.
    Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].

  3. #3
    Join Date
    Mar 2013
    Beans
    45

    Re: Semicolon cannot terminate the statement

    I'm also stuck...is it the problem of cross-compile?After cross compile the sqlite inside single board computer...problem occur...

  4. #4
    Join Date
    Dec 2007
    Location
    Behind you!!
    Beans
    978
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Semicolon cannot terminate the statement

    I'm more surprised that it let you enter a NULL value into a primary key column. But hey-ho
    computer-howto
    Linux is not windows
    Fluxbox & Flux menu how to
    Programming is an art. Learn it, Live it, Love it!


  5. #5
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,675
    Distro
    Ubuntu

    Re: Semicolon cannot terminate the statement

    It looks strange I know, but that's how SQLite deals with auto generated primary keys:

    https://www.sqlite.org/autoinc.html

    EDIT: @OP, sorry for the slight digression. Could you provide more information about what you are trying to do?
    Last edited by r-senior; April 15th, 2013 at 07:33 PM.
    Please create new threads for new questions.
    Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].

  6. #6
    Join Date
    Mar 2013
    Beans
    45

    Re: Semicolon cannot terminate the statement

    Usually the problem won't occur like this right?...I think maybe the method of cross-compile make it no response...Just suspect only...Do you guys know how to cross-compile the sqlite inside the single board computer TS-5500?

  7. #7
    Join Date
    May 2013
    Beans
    1

    Re: Semicolon cannot terminate the statement

    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 also 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
    Last edited by syahmicro; May 11th, 2013 at 04:25 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •