Subject | Re: [ib-support] How use a SP as a column lookup in a query? |
---|---|
Author | Steven D. Smith |
Post date | 2002-05-28T14:29:24Z |
Wouldn't it be more convenient to build a "telephone" table with cust_id as
the PK???
"mmenaz"
<mmenaz@lycosmail To: ib-support@yahoogroups.com
.com> cc:
Subject: [ib-support] How use a SP as a column lookup in a query?
05/28/2002 10:19
AM
Please respond to
ib-support
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
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
the PK???
"mmenaz"
<mmenaz@lycosmail To: ib-support@yahoogroups.com
.com> cc:
Subject: [ib-support] How use a SP as a column lookup in a query?
05/28/2002 10:19
AM
Please respond to
ib-support
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
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/