How can I specify a data type to a extending field in VIEW ??

How can I specify a data type to a extending field in VIEW ??

Post by Eric, Chow Hoi K » Sun, 26 Apr 1998 04:00:00



Hello,

create view TEST(Name, Tel, Incomes)as
   (
    select A.Name, A.Tel, (A.income / 12)  from A
    )

So, as the view like above.    How can I specify a datatype to "Incomes"
??

--

     _  |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|  _
    / ) |     Eric, Chow Hoi Ka            ICQ# : 3463514     | ( \
   / /  |                                                     |  \ \
 _( /_  | _   ICQ-Page : http://wwp.mirabilis.com/3463514   _ |  _) )_
(((\ \> |/ )                                               ( \| </ /)))

 \       /                                                   \        /
  \    _/     http://www.sftw.umac.mo/~d951686/               \_     /
  /   / |_____________________________________________________| \    \
 /   /                                                           \    \

 
 
 

How can I specify a data type to a extending field in VIEW ??

Post by Andrew Prosse » Sun, 26 Apr 1998 04:00:00



Quote:>Hello,
>create view TEST(Name, Tel, Incomes)as
>   (
>    select A.Name, A.Tel, (A.income / 12)  from A
>    )
>So, as the view like above.    How can I specify a datatype to "Incomes"??

Do a CONVERT;

create view TEST(Name, Tel, Incomes)as
(select A.Name, A.Tel, convert(money, (A.income / 12))  from A)

Regards
--
Andrew Prosser

 
 
 

1. Specifying the data type for a virtual field

I have to columns, both have integer datatype.  I am
trying to create a virtual field which divides one of the
columns by the other.  Since both columns are of datatype
int, the virtual field is of datatype int, but I need it
to be of datatype 'float' because I need to display the
result in decimal form.

Please help

2. Interbase - performance comparisions???

3. How can I specify a data type to a extending field in VIEW ??

4. cursor_limit

5. Create View Help - change column data type from Money(16,2) to FLOAT in the view

6. Blocking during transaction debugging

7. Viewing Only specified fields

8. Money field type same as Currency data type??

9. Specify Data Type?

10. specify data type

11. Data Type transparent to the type of the table field

12. Oracle numbes data types extended in MsAccess