I've got a large amount (1000s of rows) of Sql Profiler (2005) output I need to sort through to find a couple of specific things. I'd like to use Regexes to do this, even though my Regex-fu is pretty weak.
I'm looking for statements involving a particular temp table, which will be named something like: #ADD57L32. Unfortunately, I believe I've filtered as much out as I can with Profiler and I still have many, many lines to pour through.
The easiest way to get to where I want to go is to find all the select statements (they are legion) not involving my table and just replace them with an empty string. But I have an additional condition I'd prefer to meet: I need to ignore selects that come as part of Inserts/Updates.
I can ignore the second part if need be, since the real issue is just basic selects I have no interest in.
This:
.*select.* from #ADD57L32.*
Will get me all the select statements from my table (this is by no means the only SQL involving my table, though, and I both need to get that and need to get all of this in the proper order. I don't know how many statements will involve my table either. Could be 100s). Note that I've got all this stuff in text files, and I have extraneous trace information (basically before and after the actual SQL, I didn't try to remove any unecessary columns when I ran the trace. I probably should have), that's part of the reason for the opening and closing .* (there's also wheres, joins, order bys, etc).
I can't seem to work out how to get them for tables that aren't my table, though (I'm using Notepad++ to do this, where the expression works; for some reason the above expression isn't working in Expresso, which probably means I'm doing something wrong and don't realize it).
As to the second part, I was thinking perhaps it was too complicated to bother with, but I thought I'd ask here first. Of course, the first request might be too complicated to bother with as well. Thoughts?