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
DA Morgan wrote:
> charlie cs wrote:
>
> > 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.
>
> I', with IANAL_VISTA in terms of your assumption that we are
> all able to look over your shoulder but I think I have an idea
> what the problem is.
>
> Either:
> (1) you can't do that
> or
> (2) you don't have the necessary privilege
>
> I'd be interested in knowing which it is.
> --
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu
> (replace 'x' with 'u' to respond)
It is neither, and I'd hoped you'd have seen the problem as I did. The issue is using the database link AFTER the %type declaration. It should be before:
Declare
...
v_1 tableAcolumnA_at_db_link%type;
...
As proof:
SQL> declare
2 v_1 mytab.mycol_at_nunya%type;
3 begin
4 select mycol into v_1 from mytab_at_nunya
5 where mycol < 2;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL> You're slipping, Daniel.
David Fitzjarrell Received on Sat Mar 12 2005 - 21:47:38 CST
![]() |
![]() |