Subject Re: [ib-support] variable not updating in SP
Author Woody
From: "csswa" <csswa@...>

> SELECT RDB$FIELD_NAME
> FROM RDB$INDEX_SEGMENTS
> WHERE RDB$INDEX_NAME =
> (
> SELECT RDB$INDEX_NAME
> FROM RDB$INDICES
> WHERE (RDB$INDEX_NAME STARTING WITH 'RDB$PRIMARY')
> AND (RDB$RELATION_NAME = :VAR_TABLENAME)
> )
> INTO :VAR_PKNAME; <----------*** VARIABLE NOT REFRESHING

The first thing I would try would be to set the variable to something like
"NotFound" just before you execute this. In that way, you can tell whether
or not it is actually finding the index for the current table or not. If it
isn't, you can start looking at things such as case, etc.

Woody (TMW)