Hi Chaps,

Would appreciate any assistance here as i'm "busting my nut" trying to figure this out.

I have to read a value from a SQL script which usually starts like so

[
Code:
/*****************************************************************/
DECLARE @ApplicationID VARCHAR(50), @TaskID INTEGER, @Description VARCHAR(255)
SET @ApplicationID = 'SYSTEM' SET @TaskID = 69453 SET @Description = 'Bla BLA'

I need to scan the file using the fastest possible way and get the TaskID, I have found one way to do it being

find index of @TaskID = then increment the index by 9 "TaskID =" then remove every thing preceding it
finally remove everything after 5 chars in, so I end up with string Task ='69453'

This is wildly inefficient as I have to loop this for several hundred directories.


There must be an easier way??