Oracle View Column Type

Posts   
 
    
netclectic avatar
netclectic
User
Posts: 255
Joined: 28-Jan-2004
# Posted on: 25-Nov-2005 16:18:13   

This a bit off topic, but i'm hoping somebody here may be able to help.

I have a view in oracle which is doing a union on a few other tables. The tables all have a column in common which is defined as NUMBER(6) in all tables. I would expect the view to have the same column type in this instance but when i get the schema info for the view at runtime it is being reported as a Decimal instead of an Int32.

This is a problem when i try to add a relationship between this view and another table on this column as it reports a type mismatch between the columns.

Anybody encountered this behaviour before? I've tried using both Oracle 8 & 9, with the same results.

Posts: 497
Joined: 08-Apr-2004
# Posted on: 25-Nov-2005 17:47:18   
netclectic avatar
netclectic
User
Posts: 255
Joined: 28-Jan-2004
# Posted on: 28-Nov-2005 10:57:36   

Yeah, well i thought it might be something like that but all the tables used in the view are defined correctly. As far as i'm aware the view just gets it's column types from the tables used, you cant actually specify them specifically confused

I've managed to get around the problem in code but i still dont know why there's a problem at all.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 28-Nov-2005 11:58:41   

If you specify the view without the union, then check if the column type is a number(6), and then alter the view with adding the union, does that help?

Frans Bouma | Lead developer LLBLGen Pro