Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Create view using CAST to change datatype
List,
We have an issue where we would like to join two tables using a column of different data types, so we thought to create a view which could cast one of those join columns to match that of the other.
The problem is that we are trying to cast a character column to a number column, which under normal circumstances would be fine, except that the default value for this column is ' ', we get an error when we try to query on it.
We could of course just go the other way and cast the other table's column as character, but the other table can be joined with many other tables, and for BI reasons, we'd like to keep it that way.
Any help is appreciated.
Thanks,
Saira
![]() |
![]() |