Subject Re: variable not updating in SP
Author csswa
--- In ib-support@y..., "alex_vnru" <ded@h...> wrote:
> Andrew, addition to excellent observation of Svein Elring:
> parameters in subselects often don't work in IB/FB, especially when
> both main select and subselect have parameters. I can't exactly
> specify when it works and when not and avoid such a constructions.

Aha! Some confirmation. In that case, I will continue to tinker
with it to see if I can pin down exactly what conditions surface the
problem. Definitely something weird going on with the variables in
that subselect.

> For Select RI.RDB$FIELD_NAME
> From RDB$RELATION_CONSTRAINTS RC, RDB$INDEX_SEGMENTS RI
> Where RC.RDB$RELATION_NAME=:VAR_TABLENAME
> And RC.RDB$CONSTRAINT_TYPE='PRIMARY KEY'
> And RI.RDB$INDEX_NAME=RC.RDB$INDEX_NAME
> Order By RI.RDB$FIELD_POSITION
> Into :VAR_PKNAME

Thanks! Two new slices of code to try out soon as I get home (30 min
and counting!).

> BTW, what version of server do you use? Seems Claudio eleminated
> possibility of ambigious queries in FB. Do you use IB or old FB
build
> or did you discovered query which overcames his efforts?

latest Windows build 796 on NT4sp6.

I figure if I pull hard enough on this tiny suspicious thread I have
discovered maybe the whole server will unravel... and how will I
explain that to Claudio? :-)

Regards,
Andrew Ferguson
-- this slogan was typed in front of a live studio audience.