Cross database view with boolean columns
Posted in 2006
Topics: Installation, Setup & Upgrades, SQL Development & Query Writing, Platform-Specific Issues, Versions, Editions & End-of-Life
IDS 9.40.UC4 on Linux (2.4 kernel) - yes, we are overdue for an upgrade...
I am creating a cross-database view (same instance, though). It works fine
until I add a boolean column into the select statement. Then I get a "Not
implemented yet" error. All of the tables are in the other database; there
are no cross-database joins. Something like this:
database1;
create view new_view as
select string_col, string_col, int_col, bool_col -- (fails if bool_col
is included)
from database2:my_table;
I tried doing a cast (::char) or decode, but I still get the "not
implemented yet" error. Is this functionality implemented in 10.0? Does it
seem strange that one datatype (so far) is not implemented, while the
others work?
Sean Durity
CornerCap Investment Counsel
Manager of IT
BOOLEAN is implemented as an opaque type. According to the 10.00 Guide to SQL
Syntax:
Like other built-in opaque data types, BOOLEAN column values cannot be
retrieved by a distributed query (nor modified by INSERT, DELETE, or UPDATE
operations on a remote database) unless all of the tables that the DML
operation accesses are in databases of the local Dynamic Server instance.
The 9.40 manual is a bit sparse but seems to be saying the same thing:
Like other opaque data types, BOOLEAN column values cannot be retrieved
by a distributed query of a remote database.
That would seem to indicate that you can do what you want since both the source
and local databases are in the same instance and so not 'remote'. How are you
specifying the external table? If you included the servername that may be
infusing the parser into thinking it's a remote DB. If not I'd contact tech
support.
Art S. Kagel
----- Original Message -----
From: Sean Durity <ids@iiug.org>
At: 9/14 8:29:44
IDS 9.40.UC4 on Linux (2.4 kernel) - yes, we are overdue for an upgrade...
I am creating a cross-database view (same instance, though). It works fine
until I add a boolean column into the select statement. Then I get a "Not
implemented yet" error. All of the tables are in the other database; there
are no cross-database joins. Something like this:
database1;
create view new_view as
select string_col, string_col, int_col, bool_col -- (fails if bool_col
is included)
from database2:my_table;
I tried doing a cast (::char) or decode, but I still get the "not
implemented yet" error. Is this functionality implemented in 10.0? Does it
seem strange that one datatype (so far) is not implemented, while the
others work?
Sean Durity
CornerCap Investment Counsel
Manager of IT
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Sean, UDT's, even built-in UDT's like Boolean, do not allow for cross database support until version 10.00 In version 10.00.UC1 you are allowed built-in UDT support across databases, but only on the Same Instance. Cross instance support is planned for a later release. There is a caveat. int8 is supported across databases, and instances too for that mattter, as early as 9.30.