Subject | RE: [firebird-support] Re: soundex |
---|---|
Author | Si Carter |
Post date | 2005-11-15T10:54:44Z |
> -----Original Message-----No problems, fwiw I used the following proc to update a soundex column I
> Thank you I will give it a try and report back
>
created, in the employee table:
SET TERM ## ;
CREATE OR ALTER PROCEDURE UPDATE_SNDEX_VALUE
AS
DECLARE VARIABLE vEmpNo SMALLINT;
DECLARE VARIABLE vLastName VARCHAR(37);
DECLARE VARIABLE vSndex VARCHAR(5);
BEGIN
FOR
SELECT EMP_NO, LAST_NAME
FROM EMPLOYEE
INTO :vEmpNo, :vLastName
DO
BEGIN
EXECUTE PROCEDURE SOUNDEX(cast(vLastName as varchar(25)))
RETURNING_VALUES vSndex;
UPDATE EMPLOYEE
SET LAST_SOUNDEX = :vSndex
WHERE EMP_NO = :vEmpNo;
END
END ##
SET TERM ; ##
Rgds
Si Carter
http://www.fbtalk.net/ - Web Based Firebird Forum
http://www.tectsoft.net/ - Homepage