MattWoberts
Programmer
Hi,
I have created a view in my oracle database. I need the view to include some number that is "hard-coded" by me, so the SQL for the view could look like this:
Select Table.X, Table.Y, 10 as MyValue from Table
Now, this all works fine, but when I "DESC" my view, "MyValue" is defined as a "NUMBER" with no precision or scale - which is effectively a decimal. I need to explicitly force this number to be a integer (a NUMBER with precision of 8 and scale 0). Please can anyone tell me how to do this.... Can I use an oracle function in the view definiton or is it somehow possible to define the column precison and scale in the view?
Many thanks!
I have created a view in my oracle database. I need the view to include some number that is "hard-coded" by me, so the SQL for the view could look like this:
Select Table.X, Table.Y, 10 as MyValue from Table
Now, this all works fine, but when I "DESC" my view, "MyValue" is defined as a "NUMBER" with no precision or scale - which is effectively a decimal. I need to explicitly force this number to be a integer (a NUMBER with precision of 8 and scale 0). Please can anyone tell me how to do this.... Can I use an oracle function in the view definiton or is it somehow possible to define the column precison and scale in the view?
Many thanks!