Subject Re: Query performance improvement needed
Author Adam Clarke
----- Original Message -----
From: "Helen Borrie" <helebor@...> on

> for select IDField, filelocation from aTable where
> SUBSTR(filelocation,1,:PathLength) = :InputPath
> into :UniqueID, :OldLocation do
> begin
> OldLocation=RTRIM(:OldLocation);
> OldLength=LENGTH(:OldLocation);
> OldLocation=SUBSTR(:OldLocation,:PathLength + 1,:OldLength);
> NewPath = :OutputPath||OldLocation;
> UPDATE aTable set fileLocation= :NewPath where IDField= :UniqueID;
> end

That looks like a case study into why stored procedures should be enhanced
with regular expressions.

:), but only half :)

Adam Clarke