django sqlite3 error

55 views
Skip to first unread message

ruban bharath

unread,
Aug 23, 2018, 2:35:04 AM8/23/18
to Django users

Hi these are my tables

music_name = char(username),userId(int)

meaning = char(meaning),userid(int)

i have used the join to merge this

db = sqlite3.connect('db.sqlite3')

cursor = db.cursor()


cursor.execute('\n'

                       'INSERT INTO  music_result SELECT username, meaning ,NULL\n'

                       'FROM music_name N JOIN music_sample1 T ON N.userid = T.userid \n')
        db.commit()

when i tried to do this i got an error like

sqlite3.IntegrityError: datatype mismatch

please do help me to solve this error

C. Kirby

unread,
Aug 23, 2018, 10:18:48 AM8/23/18
to Django users
You are not using django anywhere in this question. I would send this to a python or sqlite group

Jason

unread,
Aug 23, 2018, 10:35:04 AM8/23/18
to Django users
What C. Kirby said.

I don't see any use of django in this question, and if you are interested in using it, I would look at the tutorial in the documentation for an introduction to the ORM.

Benjamin Goldberg

unread,
Aug 23, 2018, 10:44:03 AM8/23/18
to Django users
I think people need to see what your music_result table looks like before replying


On Thursday, August 23, 2018 at 2:35:04 AM UTC-4, ruban bharath wrote:
Reply all
Reply to author
Forward
0 new messages