Subject | Re: [ib-support] How use a SP as a column lookup in a query? |
---|---|
Author | Nick Upson |
Post date | 2002-05-28T15:01:32Z |
you could make it:
select cust_id, name, street, (select out_tel_no from make_telnum(cust_id))
from customer
----Original Message Follows----
From: "mmenaz" <mmenaz@...>
Reply-To: ib-support@yahoogroups.com
To: ib-support@yahoogroups.com
Subject: [ib-support] How use a SP as a column lookup in a query?
Date: Tue, 28 May 2002 14:19:47 -0000
Hi, I would like something like this:
Select cust_id, name, street, telephone from customer
But telephone must be "build" by a stored procedure, that checks some other
tables, makes some elaboration, and returns a varchar (so it's a sort of
"lookup" field but with a complex elaboration, so I can't take it directly
from a table).
If my SP is something like "make_telnum( in_cust_id, out_tel_num)" how can I
do that? What is the syntax?
It should be like:
select cust_id, name, street, out_tel_num
from customer
inner join make_telnum(cust_id)
on ?????? on what?
And, is there a better solution?
Thanks
Marco Menardi
_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
select cust_id, name, street, (select out_tel_no from make_telnum(cust_id))
from customer
----Original Message Follows----
From: "mmenaz" <mmenaz@...>
Reply-To: ib-support@yahoogroups.com
To: ib-support@yahoogroups.com
Subject: [ib-support] How use a SP as a column lookup in a query?
Date: Tue, 28 May 2002 14:19:47 -0000
Hi, I would like something like this:
Select cust_id, name, street, telephone from customer
But telephone must be "build" by a stored procedure, that checks some other
tables, makes some elaboration, and returns a varchar (so it's a sort of
"lookup" field but with a complex elaboration, so I can't take it directly
from a table).
If my SP is something like "make_telnum( in_cust_id, out_tel_num)" how can I
do that? What is the syntax?
It should be like:
select cust_id, name, street, out_tel_num
from customer
inner join make_telnum(cust_id)
on ?????? on what?
And, is there a better solution?
Thanks
Marco Menardi
_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com