Subject Re: [ib-support] How use a SP as a column lookup in a query?
>>>>> On Tue, 28 May 2002 14:19:47 -0000, "mmenaz" <mmenaz@...> said:

m> Hi, I would like something like this: Select cust_id, name,
m> street, telephone from customer

m> But telephone must be "build" by a stored procedure,

I'm used to use this idiom:

SELECT ta.Key, ta.Desc, sp.Value
FROM TableA ta
LEFT JOIN StoredProc (ta.Key) sp ON 1=1

and it seems to correctly call the StoredProc once for each ta.Key.

hth, ciao, lele.
nickname: Lele Gaifax | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas | comincero' ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.