noborus / trdsql

CLI tool that can execute SQL queries on CSV, LTSV, JSON, YAML and TBLN. Can output to various formats.
https://noborus.github.io/trdsql/
MIT License
1.96k stars 73 forks source link

Question. Can trdsql query by a column has no value(null or empty) #175

Closed mailsanchu closed 2 years ago

noborus commented 2 years ago

trdsql considers an empty string ('') if it has no value.

a,b,c
,,2
1,2,3
trdsql -ih -omd "SELECT * FROM test.csv WHERE a=''"
a b c
2

The number of columns counts the first row by default. You can change the number of rows that determine the number of columns with -ir num.

mailsanchu commented 2 years ago

Happy to close this question

mailsanchu commented 2 years ago

image Any option to use the full terminal width?

noborus commented 2 years ago

There is no such option. You can create another issue as a request. However, depending on the terminal width presents many problems.

mailsanchu commented 2 years ago

No bother. I am just checking for any hidden feature :)