Subject RES: RES: [firebird-support] soundex
Author Andre Fogelman
I was only able to make it work after disabling a trigger that I had created in order to update new records and by creating the stored procedure below. I just don't know why with the sored procedure it worked and doing an update directly did not

CREATE PROCEDURE PROC_INDCEMIT_SOUNDEX
AS
DECLARE VARIABLE VCODIGO INTEGER;
begin
/* Procedure Text */
for SELECT codigo_FALECIDO FROM CADFALEC into :VCODIGO
do
begin
UPDATE CADFALEC set CLASSIFICADO = F_GENERATESNDXINDEX(FALECIDO) where (CODIGO_FALECIDO = :VCODIGO AND FALECIDO IS NOT NULL);
end
suspend;
end

-----Mensagem original-----
De: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Em nome de Helen Borrie
Enviada em: terça-feira, 15 de novembro de 2005 02:25
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: [firebird-support] soundex

At 01:12 AM 15/11/2005 -0200, you wrote:
>I am using the UDF in FreeUDFLib .
>
>I have met one problem. I used basically the statement below.
>
>UPDATE indcemit set classificado = F_GENERATESNXINDEX(falecido)
>
>It works well with all tables but one. On this special table the script
>hangs and no result is reached. I have to reset my computer.

ERm, could it be that falecido is nullable on that table? UDFs of the
traditional kind get unhappy if passed a null as input. For a safe update
statement, you should do this:

UPDATE indcemit set classificado = F_GENERATESNXINDEX(falecido)
where falecido is not null

Helen





++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links








[Non-text portions of this message have been removed]