0

I used SQLITE to merge two files, since my python was running out of memory when joining the two files.

I used the following command

 .headers on
 .mode csv
 .output test.csv

 Select * from new_dataframe Left outer join dataframe on new_dataframe.user_id=dataframe.user_id;

 .output stdout

When I use the above code, it gives me syntax error as

near ".": syntax error:

So I removed the ".", but then it gives me the error

near "headers": syntax error: 

Then I thought I will try using ";" but it still gives me the same error as above.

I am using DB Browser for SQLite and as you can tell fairly new to SQLite. I have tried to look up documentation and I can't figure it out. I even looked up some tutorials on youtube and they all seem to be using a '.' before their commands, however none of them is using DB browser.

Does anyone know what's going on here?

Also when I simply run this command

   Select * from new_dataframe Left outer join dataframe_updated on new_dataframe.user_id=dataframe_updated.user_id

it runs fine. Creates a new table, no ";" required, possibly because its a single line code.

1

1 Answer 1

0

SQLite itself speaks SQL. The dot commands are implemented by the sqlite3 command-line shell; to be able to use them, you must run your script in there.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.