Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 31 to 32 of 32 total |
Syntax for date calculation |
Wed, Jun 20 2012 1:51 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< Indeed. As I understand it this is a restriction on parameters being used as result columns (or column modifiers), not anything to do with Intervals as such. >> You are correct. You simply can't use parameters in the SELECT expressions list. Tim Young Elevate Software www.elevatesoft.com |
Wed, Jun 20 2012 1:58 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< You cannot use parameters in intervals. >> Not correct. John's example will work fine for Sorin: SELECT datefield+CAST(integerfield AS INTERVAL MONTH) AS NewDateField FROM Table You can cast any INTEGER as an INTERVAL. Table and rows: CREATE TABLE "MonthTest" ( "DateField" DATE, "IntegerField" INTEGER )! INSERT INTO "MonthTest" VALUES (DATE '2012-06-20', 10)! INSERT INTO "MonthTest" VALUES (DATE '2012-06-20', 2)! INSERT INTO "MonthTest" VALUES (DATE '2012-06-20', 3)! INSERT INTO "MonthTest" VALUES (DATE '2012-06-20', 4)! Tim Young Elevate Software www.elevatesoft.com |
« Previous Page | Page 4 of 4 | |
Jump to Page: 1 2 3 4 |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |