[INFO] creation date OF RECORD. NOW().

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Mar 21 03:01:11 CDT 2007


On 21/3/07 12:10 AM, "Kim Kohen" <kim at webguide.com.au> wrote:

> G'day Bart,
> 
>> I looks like I would need to place the now function in the default
>> value for the field instead of creating a method.
>> How would I do that ?
> €€€€
> In VStudio you do it at the time you create the field. I don't know
> of any way of changing it (through VStudio at least) after it's been
> created - it may be possible programatically but I haven't tried.
> Actually it would make a good feature request - the ability to edit
> the 'default value' value from within VStudio.
> 
> Be warned though, that this is the exact circumstance where I'm
> seeing an error/bug. Refer to Mantis:  http://www.valentina-db.com/bt/
> view.php?id=2257

Hi Bart,
Hi Kim,

1) So you want create a record and one its field should have NOW value.
Why not simply as:

    INSERT INTO T1( f1, f2, f3) VALUES ( NOW(), x, y )


2) We have check and remember that DEFAULT VALUE of field can be only a
constant by SQL92. You cannot specify here NOW() or other formula.


3) in upcoming Valentina 3.0 the case (1) can be simplified by usage of
trigger. See this page for example:

http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
tation:vsql:reference:create_trigger


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list