2009. június 30., kedd

Decrementing a datetime field in Paradox


Problem/Question/Abstract:

Decrementing a datetime field in Paradox

Answer:

There is a bug in Local SQL on Paradox:

Executing an Update statement on a Paradox table where '1' is being subtracted in a datetime field does not subtract '1', but rather adds '1'.

// this will ADD one!
UPDATE SAMPLE.DB set DT = DT - 1

// the following workaround will give the correct result:
UPDATE SAMPLE.DB set DT = DT + (-1)

Nincsenek megjegyzések:

Megjegyzés küldése