You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[dbtool] Add exec <QUERY> command for ad-hoc SQL queries
Thin diagnostics helper for inspecting INFORMATION_SCHEMA, sanity-
checking row counts, or running one-off queries from CI / shell
scripts. Streams the result set as tab-separated values to stdout;
row count goes to stderr.
The query is read from the command-line argument or, when no argument
is supplied (or `-` is passed), from stdin until EOF. Multi-statement
scripts pass through to ExecuteDirect — the ODBC driver advances
through subsequent result sets automatically.
dbtool --profile X exec "SELECT * FROM INFORMATION_SCHEMA.COLUMNS"
echo "SELECT COUNT(*) FROM users" | dbtool --profile X exec
Used during the MSSQL UTF-8 literal investigation to confirm that
MSSQL was decoding raw `N'für'` as four CP-1252 codepoints rather
than three Unicode codepoints, which led to the NCHAR-concatenation
fix shipped in the previous commit.
Signed-off-by: Christian Parpart <christian@parpart.family>
0 commit comments