Icon View Thread

The following is the text of the current message along with any replies.
Messages 31 to 32 of 32 total
Thread Syntax for date calculation
Wed, Jun 20 2012 1:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email 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 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email 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 PagePage 4 of 4
Jump to Page:  1 2 3 4
Image