Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help: How to refrence a column over the database link
IANAL_VISTA wrote:
> "charlie cs" <cfs3526_at_ureach.com> wrote in
> news:T9NYd.4229$wL6.2880_at_trnddc03:
>
> > Hi, group, in PL/SQL, if i want to refrence a column over the
database
> > link, something like this
> >
> > Declare
> > ......
> > v_1 tableA.columnA%type_at_db_link;
> > .....
> > Begin
> > ....
> > end;
> >
> > but it is not working. Could somebody tell me how to do it?
> >
> > Thanks for your help.
> >
> >
> >
>
> "not working" is less than obvious.
> Since you won't share any specific error information,
> You're On Your Own (YOYO!)
Such a wonderful sentiment. That aside, I expect it's your declaration which is 'out of whack'; apparently you don't work with database links very often. You should be referencing the table name and column name from the database link, then adding the '%type' at the end:
Declare
......
v_1 tableA.columnA_at_db_link%type;
.....
Begin
....
end;
Had you thought this through for a moment you would have realised you declare such variables as:
v_1 tableA.columnA%type;
So it only makes sense to add the dblink information immediately after the column name, not after the '%type' declaration.
David Fitzjarrell Received on Sat Mar 12 2005 - 21:18:43 CST