0

Thanks for taking the time to read this. I'm a beginner programmer with some experience in Python, and I just started reading Zed Shaw's Learn SQL the Hard Way. In exercise 1, he has you create an .sql file type the following command in powershell:

sqlite3 ex1.db < ex1.sql

After running the following in the command-line, I receive the following error message

The '<' operator is reserved for future use.

I checked a few stackoverflow pages for answers. Unfortunately, I cannot figure out how to bypass this error message and make a .db file from a .sql file. Apologies for any nuisances; I'm very new to stackoverflow. Any help or advice in solving this problem is greatly appreciated!

Community
  • 1
  • 1

2 Answers2

2

The examples that you are looking at are running inside of the bash shell on a *NIX platform. You stated that you're using PowerShell which means that the command will be different. I'm guessing it will look something like:

Get-Content ex1.sql | sqlite3 ex1.db
Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
0

PowerShell is incompatible with any other shell. If you do not know the syntax of both normal shells and PowerShell, and how to translate from one to the other, you should not user PowerShell in the first place.

Use the standard Windows command prompt (cmd.exe) instead.

CL.
  • 173,858
  • 17
  • 217
  • 259