sqlite tuples

Discussion in 'Python' started by John K Masters, Jul 17, 2007.

  1. I am fairly new to Python and am trying to get to grips with pysqlite2.
    >From what I have read data is returned as a list of tuples when using

    SELECT via connection.cursor. But I have not, despite frantic googling,
    found how to INSERT a list of tuples into a sqlite table. If I convert
    the tuple to a string and concatenate it to the 'INSERT INTO table etc.'
    string then it works, but only if all the tuple values are strings and
    then only if all the table fields are of type TEXT.

    Is it possible to, and if so how can one, insert a list of tuples into a
    sqlite table?

    Regards, John
    --
    War is God's way of teaching Americans geography
    Ambrose Bierce (1842 - 1914)
     
    John K Masters, Jul 17, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Kish
    Replies:
    11
    Views:
    1,015
    Jeff Kish
    Oct 21, 2004
  2. Ivan Voras

    tuples vs lists

    Ivan Voras, Sep 16, 2003, in forum: Python
    Replies:
    10
    Views:
    752
    Donn Cave
    Sep 17, 2003
  3. Replies:
    5
    Views:
    833
    Thomas J. Gritzan
    Oct 6, 2006
  4. tuples within tuples

    , Oct 26, 2007, in forum: Python
    Replies:
    12
    Views:
    912
    Dennis Lee Bieber
    Oct 27, 2007
  5. xera121
    Replies:
    8
    Views:
    988
    lolmc
    Sep 30, 2009
  6. Carl Youngblood
    Replies:
    1
    Views:
    413
    Carl Youngblood
    Apr 9, 2005
  7. Replies:
    4
    Views:
    579
  8. Jon Reyes
    Replies:
    18
    Views:
    514
    Mitya Sirenef
    Feb 19, 2013
Loading...