Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
CAST error 2 |
Thu, Apr 12 2007 2:33 PM | Permanent Link |
"Ole Willy Tuv" | select
cast(current_timestamp as date), cast(current_timestamp as time) from dummy Error: ElevateDB Error #700 An error was found in the statement at line 3 and column 26 (Expected Char, VarChar, Byte, VarByte or Time expression but instead found CURRENT_TIMESTAMP()) This seems like a bug. A TIMESTAMP value can be converted to any datetime type. Ole Willy Tuv |
Thu, Apr 12 2007 4:11 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ole,
<< This seems like a bug. A TIMESTAMP value can be converted to any datetime type. >> The reason it was done was to prevent truncation of the date portion, but I see no harm in allowing it if someone wants to do it. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Apr 12 2007 4:28 PM | Permanent Link |
"Ole Willy Tuv" | Tim,
<< The reason it was done was to prevent truncation of the date portion, but I see no harm in allowing it if someone wants to do it. >> I don't unerstand what you mean ? There's no truncation going on here. The result is exactly the TIME part of the TIMESTAMP value. Since the the result of the CAST is a TIME, there are no fields lost in the result. Ole Willy Tuv |
Sat, Apr 14 2007 3:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Ole,
<< I don't unerstand what you mean ? There's no truncation going on here. The result is exactly the TIME part of the TIMESTAMP value. Since the the result of the CAST is a TIME, there are no fields lost in the result. >> Well, yes, once something is cast from a timestamp to a time, then the date is lost and can't be derived from the time value. If you think about it in terms of converting a column from one type to another, then you will see what I was thinking. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |