I am writing a PS Select-String to extract out all SQL SELECT statements from a text file.
I am looking extract all SELECT statements. Each SELECT statement terminates with a
; character.
I can find the the SELECT string fine. I not having any luck with writing the rest of the statement thru the teminator ; character.
The pattern would be find the SELECT pattern and keep returning until the ;
Any suggestions would be assisted.
The input file contains hundreds of SQL statements. I only want the SELECTs.