View Single Post

   
  #6 (permalink)  
Old 02-27-2008, 02:50 AM
Santiago Ordax Solivellas
 
Posts: n/a
Default Re: SQL error 204 when we try to access tables via alias

Lets see, table1 is the table i want to access on lib2, and alias1 is
the alias i have on lib1 pointing to lib2.table1. If I...

connect to database user lib1 using password

and then

select * from alias1

it should look for lib1.alias1 (the alias) as it do with normal tables
on lib1 but it fails and it seems its looking for owner.alias1, but if
i

select * from lib1.alias1

it works!

Why does it put "lib1" as the default schema for tables and "owner" as
the default schema for aliases???

I cannot qualify tables cause programs must run non qualified on
target environment.


"Mark Yudkin" <myudkinATcompuserveDOTcom@boing.org> wrote in message news:<ctvho9$pi3$1@ngspool-d02.news.aol.com>...
> The error message refers to the statement you wrote, not the aliases. The
> statement:
> select * from table1
> qualifies table1 with the current schema or owner as determined by the
> statement's context.
>
> You must either qualify the table (as Knut recommends), or specify an
> alternative default . I use qualification for ad-hoc SQL, and the
> precompiler QUALIFIER option with unqualified names in embedded SQL.

Reply With Quote