I run following query in query analyzer,
ssql="SELECT contractno,recordno,category,contractor,consultant ,Description,drawingno,approveddate, REVERSE(LEFT(REVERSE(Imagereference), CHARINDEX('\', REVERSE(Imagereference)) - 1)) imagereference FROM arc where contractor='"& contractor& "'"
it give following error
(95 row(s) affected)
Server: Msg 536, Level 16, State 3, Line 1
Invalid length parameter passed to the substring function.
Some time query give result and display records and sometime it give above error.
How I can debug the query ?
How I can find the error in the query ?
Please help
Mateen Martin
[email protected]