- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsDoes anyone have any sample code using dblink.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: skandalamPosted on 2000-08-04 at 08:22:30ID: 3776372
create or replace
function GF_address ( pv_street_name in varchar2,
pv_apt_no in varchar2,
pv_city in varchar2,
pv_zip in varchar2)
return varchar2 is
lv_address_no varchar2(15);
begin
SELECT ADDR_NUM
INTO lv_address_no
FROM HQ.CLIENTS_ADDRESSES@HQRS
WHERE
STREET_NAME = PV_STREET_NAME
AND CITY = PV_CITY
AND ZIP = PV_ZIP
AND APT_NO =
DECODE(PV_APT_NO, NULL, ' ', PV_APT_NO);
return lv_address_no;
exception
when no_data_found then
return (null);
when too_many_rows then /* if block addresses, store it in Outside_Address table */
return (null);
end gf_address;
Here HQRS is a dblink .
And DBLINK HQRS is created as follows.
CREATE PUBLIC DATABASE LINK hqrs
CONNECT TO hr IDENTIFIED BY hr909
USING hqprod ;
Where HQPROD is defined in TNSNAMES.ORA file.