Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Alter INETERVAL Column with Default not working
Fri, Mar 2 2018 12:33 PMPermanent Link

Rolf Frei

eicom GmbH

Is this a bug? This Alter doesn't work and I have no idea how else I can add a default to an Interval column.

ALTER TABLE "VideoList"
ALTER COLUMN "DurationTime" AS Interval Day To Second DEFAULT Interval Day To Second '0 00:00:00'

This give this error:
"ElevateDB Error #700 An error was found in the statement at line 2 and column 72 (Expected interval constant but instead found Day)"
Fri, Mar 2 2018 1:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rolf,

<< Is this a bug? This Alter doesn't work and I have no idea how else I can add a default to an Interval column.

ALTER TABLE "VideoList"
ALTER COLUMN "DurationTime" AS Interval Day To Second DEFAULT Interval Day To Second '0 00:00:00' >>

What you want is this:

INTERVAL 'D H:M:S' DAY TO SECOND

so the ALTER TABLE statement would be:

ALTER TABLE "VideoList"
ALTER COLUMN "DurationTime" AS Interval Day To Second DEFAULT Interval '0 00:00:00' Day To Second

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Mar 5 2018 7:52 AMPermanent Link

Rolf Frei

eicom GmbH

Tim

Thank you.

Regards
Rolf
Image