jbanana: Badly drawn banana (Default)
J Banana ([personal profile] jbanana) wrote2013-11-19 05:29 pm
Entry tags:

Painful geekery

By combining Cygwin and some "new" for syntax, I can find tables inserted into by a huge script and generate queries to see how many rows there are now:
C:\sql> for /f %G in ('grep "insert into" load.sql ^| cut -d " " -f 3 ^| sort ^| uniq') do @echo select count(*) from %G;
If only the load script worked then there would have been some point to figuring that out.

And I say "new" in quotes because it changed at some time since I learned the "old" syntax twenty-something years ago...