Creating code.sql on windows


Hello all,

I had an issue with creating the code.sql on windows that I was hoping someone could help me out with. My image below I’ve highlighted two ways of trying it, receiving two different errors (I also condensed a few lessons together into one sql file so im only using ex1,ex3, and ex4)

In the first brackets I’ve tried the code in the text editor on the right with and without commas. The second I made in the terminal with commas seperating the examples and typing directly into the terminal and I get that “??C” error spat back at me.

Any suggestions would be great, thanks.


The first one is because that’s not SQL in the file. You see how you have:

cat ex1.sql, ex3.sql, ex4.sql -init code.sql

That’s actually not anything I have in my book, and that wouldn’t work in a .sql file or in your shell. It’s seems like you kind of know a few commands and then are just combining them thinking it’ll work. What I suggest you do is go hit this:

It’s my free command line course. Do that and it’ll make sense why that wouldn’t work.

The second looks like the contents of your code1.sql file are garbage. You should open it in your text editor and look at it there. Most likely you have an encoding for your country that is then altering the encoding the code1.sql file to be not-ASCII, but sqlite3 I think requires ASCII.

It’s best to just create this in the text editor and don’t use the terminal to make these files in that case.