|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
I am using IbExpert, this is what I am typing, but I keep receiving the same error message all time:AS declare variable changes varchar(8000); begin if (old."id" <> new."id") then changes = :changes + 'ID: ' + old."id" + ' / ' + new."id"; if (old."nome" <> new."nome") then changes = :changes + 'NOME: ' + old."nome" + ' / ' + new."nome"; INSERT INTO "HistoryTest" values (old."id", old."nome", 'now', 'I', :changes); end ERROR --> Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements. Dynamic SQL Error. expression evaluation not supported. Another question, how do I get the system time? in MS Sql would be, GetDate() Thanks a lot Patrick |
|
#2
|
|||
|
|||
|
Quote:
try current_timestamp. -- Best regards, Fikret Hasovic http://fikret.fbtalk.net * Firebird Foundation Committee member. - Join today at http://www.firebirdsql.org/ff/foundation * JEDI VCS contributor http://jedivcs.sourceforge.net/ * Firebird and Fyracle news http://www.fyracle.org |
|
#3
|
|||
|
|||
|
Use || for concatenation
if (old."id" <> new."id") then changes = :changes || 'ID: ' || old."id" || ' / ' + new."id"; if (old."nome" <> new."nome") then changes = :changes || 'NOME: ' || old."nome" || ' / ' || new."nome"; |
|
#4
|
|||
|
|||
|
I changed to:
AS declare changes varchar(1000) ; begin if (old."id" <> new."id") then changes = :changes + 'ID: ' || old."id" || ' \ ' || new."id"; if (old."nome" <> new."nome") then changes = :changes + 'NOME: ' || old."nome" || ' \ ' || new."nome"; INSERT into "HistoryTest" values (old."id", old."nome", 'now', 'U', :changes); end But I still get error: "Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements. Dynamic SQL Error. expression evaluation not supported." |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Trigger - What´s wrong??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|