What I was trying to do was add two records (Primary key is the TimeStamp Field)

The solution:
INSERT INTO MyTable(MyTimeStampField, MyVarCharField) VALUES ('NOW'), 'Blah 
Blah Blah');
COMMIT;
INSERT INTO MyTable(MyTimeStampField, MyVarCharField) VALUES (SELECT 
MyTimeStampField + 0.00002 FROM
                    MyTable WHERE MyVarCharField = 'Blah Blah Blah'), 'Yadda 
Yadda Yadda');
COMMIT;

If I was doing only 1 insert I could have done an insert for Now then an Update of the inserted record + 0.00002 for 1 second.

(0.00001 is only part of a second).

Regards
Paul McKenzie
SMSS Ltd.
Wellington
New Zealand


Rohit Gupta wrote:
Paul just add fractions of a day - segments from one of my Sps

Offset = cast (ipExpiry_Sec as float) / (24 * 60 * 60); /* Fractions of Day */

update "Locks" set "End_Time" = current_timestamp + :Offset


Date sent: Tue, 19 Apr 2005 16:11:26 +1200 From: Paul McKenzie <[EMAIL PROTECTED]> Organization: SMSS Ltd. To: Delphi List - Delphi <[email protected]> Subject: [DUG] Interbase dates Send reply to: NZ Borland Developers Group - Delphi List <[email protected]> <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>

[ Double-click this line for list subscription options ]

In Interbase 7.1 how do I add 1 to Now ?

I want to be able to add 1 second to the current time...
eg
INSERT INTO MyTable(MyTimeStampField, MyVarCharField) VALUES ('NOW' + 1), 'Blah 
blah Blah');
COMMIT;



_______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to