Title: | SQL notes |
Moderator: | NOVA::SMITHI |
Created: | Wed Aug 27 1986 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3895 |
Total number of notes: | 17726 |
Hi, there is a customer that has the same problem like in 3511, where there are two db in witch in one there is the table with a date vms formatted field, and there is a second with a bigint field. Every cast attempt to cast the date VMS to the bigint give me the result: %RDB-F-CONVERR, error Is there a method to convert it by use an SQL function? Regards, Francesco
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3887.1 | NOVA::SMITHI | Don't understate or underestimate Rdb! | Thu May 08 1997 12:01 | 25 | |
~there is a customer that has the same problem like in 3511 Sorry this is not the same problem. That customer at least had compatible data types. ~where there are two db in witch in one there is the table with a date vms ~formatted field, and there is a second with a bigint field. Every cast ~attempt to cast the date VMS to the bigint give me the result: %RDB-F-CONVERR, ~error Ok that is expected, Rdb doesn't know the formats are compatible, certainly the types are not. ~Is there a method to convert it by use an SQL function? yes. write a simple external function. create function BIGINT_TO_DATE_VMS (in bigint) returns date vms; external ...etc...; Now write a routine which accepts the passed BIGINT and returns it. You can use this to coerce the type. Ian | |||||
3887.2 | THANK | ITVMS1::FALLOGGI | Sport is better than politics | Thu May 08 1997 12:48 | 5 |
Hi Ian, Thank You for Your suggests and very precious example! Cheers, Francesco |