I ran a sql script that uses a cursor to execute sp_table_privileges
on each table in a database.
If you run the script and save the output to a file you get this after each iteration:
data,data,data,data,data,data,data
(x row(s) affected)
next_table_name
TABLE_QUALIFIER,TABLE_OWNER,TABLE_NAME,GRANTOR,GRANTEE,PRIVILEGE,IS_GRANTABLE
I was able to remove the (x row(s) affected)
in Notepad++ by using the regular expression replace with (\(.*\))
but it replaced it with a blank line.
So now I have 3 blank lines, the next tables name and the columns.
I know you can remove blank lines in Notepad++.
But, can I use a regular expression to find 3 blank lines, remove them and two lines below them?
If not is there a better way to do this?