Sample Header Ad - 728x90

Syntactical error with csvsql query?

0 votes
1 answer
143 views
I have a csv file attributes.csv from which I want to retrieve all records to a new file attributes_withoutPIDate.csv excluding records for which the Name column has "PI Date" as the value. Commanding csvsql in this manner csvsql -d ',' -I --query 'select * where Name "PI Date" from attributes' attributes.csv > attributes_withoutPIDate.csv yields an error
(sqlite3.OperationalError) near "from": syntax error
[SQL: select * where Name  "PI Date" from attributes]
(Background on this error at: http://sqlalche.me/e/e3q8) 
I suspect a syntactical error. Can someone advise how to fix it?
Asked by ptrcao (5995 rep)
Dec 22, 2019, 04:35 AM
Last activity: Dec 23, 2019, 03:45 AM