Subject | Re: [SPAM] Re: [firebird-support] Firebird : find strign in all database |
---|---|
Author | Neville Richards |
Post date | 2017-01-11T10:12:11Z |
Hi thanks for your reply
i have this code but something gone wrong
SET TERM !;
EXECUTE BLOCK
RETURNS (DANSTABLE CHAR(31), DANSCOLONNE CHAR(31) )
AS
DECLARE VARIABLE STMT VARCHAR(250);
DECLARE VARIABLE CHAINE VARCHAR(50);
DECLARE VARIABLE RESULT SMALLINT;
BEGIN
CHAINE='ACHERCHER';
FOR SELECT r.RDB$FIELD_NAME,
r.RDB$RELATION_NAME
FROM RDB$RELATION_FIELDS r LEFT JOIN RDB$FIELDS F ON r.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME
WHERE r.RDB$SYSTEM_FLAG=0 AND f.RDB$FIELD_TYPE IN (37,14) AND f.RDB$FIELD_LENGTH>=9
INTO :DANSCOLONNE,:DANSTABLE
DO BEGIN
STMT='SELECT 1 FROM '||:DANSTABLE||' WHERE '||:DANSCOLONNE||' = ?';
EXECUTE STATEMENT (STMT) (CHAINE) INTO :RESULT;
IF (RESULT IS NOT NULL) THEN SUSPEND;
END
END!
SET TERM ; !