Subject | RE: [firebird-support] Timestamp - trigger |
---|---|
Author | Dion |
Post date | 2006-02-05T22:49:19Z |
CREATE TRIGGER SMSQ_RecDateIns FOR SMSQ
ACTIVE AFTER INSERT POSITION 0
AS
begin
/* Trigger text */
New.receivedate = cast('NOW' as timestamp);
End
Yields the following result:-
Unknown SQL Datatype(0).
Dion.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Ann W. Harrison
Sent: 06 February 2006 12:51 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Timestamp - trigger
Dion wrote:
after the assignment
The second problem is that in Dialect 3, double
quotes indicate that the string is a delimited
identifier - the name of a table or field. Use
single quotes.
New.receivedate = cast('NOW' as timestamp);
Regards,
Ann
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04/02/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04/02/2006
ACTIVE AFTER INSERT POSITION 0
AS
begin
/* Trigger text */
New.receivedate = cast('NOW' as timestamp);
End
Yields the following result:-
Unknown SQL Datatype(0).
Dion.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Ann W. Harrison
Sent: 06 February 2006 12:51 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Timestamp - trigger
Dion wrote:
>The first problem is that you need a semicolon
> I get an “Unknow token – end” here.
>
>
> CREATE TRIGGER SMSQ_RecDateIns FOR SMSQ
> ACTIVE AFTER INSERT POSITION 0
> AS
> begin
> /* Trigger text */
>
> New.receivedate = cast("NOW" as timestamp)
>
> end
after the assignment
The second problem is that in Dialect 3, double
quotes indicate that the string is a delimited
identifier - the name of a table or field. Use
single quotes.
New.receivedate = cast('NOW' as timestamp);
Regards,
Ann
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04/02/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04/02/2006