I regularly use Textpad to compile SQL into MS SQLServer using the ISQL tool.
If there is an error I get a message lke:
"Msg 133, Level 15, State 1, Server MARKTELE, Procedure p_RPO_Intraday_PreProcess, Line 261
A GOTO statement references the label 'TheEnddd' but the label has not been declared.
Tool completed with exit code 1"
I have tried in vain to get Textpad to jump to (in this case) Line 261 of the document that was being compiled. The RegExes I've tried include:
^.* Line \([0-9]+\)
Line \([0-9]+\)
and also (after setting Use POSIX regular expression syntax):
Line ([0-9]+)
However I always get "Cannot jump to item under cursor"
I have set the register for Line =1 and the others blank.
Can anyone help?
Thanks
Mark
Reg expression ISQL output
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Ed
Re: Reg expression ISQL output
I think that the problem here is that you have no file name for TextPad to refer to. When attempting to jump from the current "file" (which must be Command Results) it has no way of knowing which file caused the problem. You know and I know but how to tell TextPad...
-
Mark
Re: Reg expression ISQL output
But in the docs it says:
"In general, each line must include a file name, but there is one special case: if the output specifies only the corresponding line numbers (and optional column numbers), the file name is assumed to be that of the document that was active when the tool was started."
"In general, each line must include a file name, but there is one special case: if the output specifies only the corresponding line numbers (and optional column numbers), the file name is assumed to be that of the document that was active when the tool was started."
-
Andreas
Re: Reg expression ISQL output
I just played around with that using a dummy tool, a perlscript which just writes some lines:
SomeStuff Line 32 Someotherstuff
SomeStuff Line 64 Someotherstuff
SomeStuff Line 128 Someotherstuff
SomeStuff Line 256 Someotherstuff
Using
.*Line \([0-9]+\).*
worked, it did not work when I removed one or both of the .*
for POSIX, just remove the \
.*Line ([0-9]+).*
(I did not test the POSIX variant, only the non-Posix)
It seems like the Regex has to match the whole line...
HTH
Andreas
SomeStuff Line 32 Someotherstuff
SomeStuff Line 64 Someotherstuff
SomeStuff Line 128 Someotherstuff
SomeStuff Line 256 Someotherstuff
Using
.*Line \([0-9]+\).*
worked, it did not work when I removed one or both of the .*
for POSIX, just remove the \
.*Line ([0-9]+).*
(I did not test the POSIX variant, only the non-Posix)
It seems like the Regex has to match the whole line...
HTH
Andreas