Toad World® Forums

Problem to sync tables with data compare in TOAD SS BETA


Last BETA version of TOAD 6.0.
I try to synchronize two tables in defferent DB. Table are identicalbut contains differet datas.
In attach you find a ZIP file. This file contains :

  1. Screenshot inJPG format of comparison.
  2. DATA_SYNC.SQL statement SQL generated by TOAD to synchornize these 2 tables.
  3. TXT file with the result of execution of DATA_SYNC.SQL in TOAD.

The problem was in
[ULTMOD] = ‘2012-11-09’
[ULTMOD] = ‘2012-11-27’

Format of Time isn’t correct.
If I execute the same steps in TOAD 5.8 release all is OK.

I stay tune for your answer.

Best regards.

Sergio Bertolotti (263 KB)


Sergio, just curious what format of datetime you are using in toad?
you can see it in options -> environment -> grid -> data type formatting section



see my screenshot in attach. It show you date time grid settings.

Best regards.

Sergio Bertolotti



UPDATE [dbo].[ANAGRAFICA_ALBERGHI] SET [ULTMOD] = ‘2012-09-11 09:05:42.083’ WHERE [CODICE] = 23

UPDATE [dbo].[ANAGRAFICA_ALBERGHI] SET [ULTMOD] = ‘2012-27-11 15:47:50.013’, [UTENTE] = ‘ATLANTICZEISER\m.ticozzi’ WHERE [CODICE] = **26

The correct value of field datetime to execute correctly these 2 statements is :

‘YYYY-DD-MM HH:MM:SS.sss’ where

YYYY year
DD day
MM month
HH hour
MM minute
SS second
ss milli second.

I never change nothing in my regional settings of my notebook.

Best regards.

Sergio Bertolotti**

Last beta version of TOAD SS and the problem is still present.

I redo your tool and it generate this script :


I execute manually the instruction in SQL editor and discover that the correct statement is :


Last beta version of TOAD SS an the problem is still present.

Best regards.

Sergio Bertolotti


Hi Sergio,

Good news, in next beta it will be fine again. Thank you much for pointing this out!

If you are interested, here is some background. Actually ‘YYYY-DD-MM’ format is not correct as well, the behavior depends on regional settings. We used ‘YYYY-MM-DD’ format because regardless of regional settings it works fine for such types as date, datetime2, datetimeoffset. The bad thing is that datetime and smalldatetime types does not guarantee this as well. So now we use ISO 8601 format ‘YYYY-MM-DDThh:mm:ss[.mmm]’ that will always provide correct results despite of regional settings, or SET DATEFORMAT or SET LANGUAGE settings.


Hi Stanislav,

current beta or the next one ?

Many thank’s for your explanation of the problem.

Best regards.

Sergio Bertolotti



I dowload new beta version of TOAD SS and the problem it’s still present.

See script SQL in attach that TOAD generated.
As you can see the format of datetime field issn’t like you tell me previously.

In details :

Wrong :

UPDATE [dbo].[ANAGRAFICA_ALBERGHI] SET [ULTMOD] = ‘2012-11-09T09.05.42.083’, [UTENTE] = ‘dbo’ WHERE [CODICE] =


Correct :

UPDATE [dbo].[ANAGRAFICA_ALBERGHI] SET [ULTMOD] = ‘2012-11-09T09:05:42.083’, [UTENTE] = ‘dbo’ WHERE [CODICE] = **23

The problem is time separator.

I stay tune for your consideration about this.

Best regards.

Sergio Bertolotti**

data_sync.sql (3.94 KB)


Hi Sergio,

Sorry for long waiting, I’ve just returned from vacations Yes, you are right, I’ve found out that region specific time delimiter was used, so for example on English regional setting it’s “:” but on Italian it’s “.”, thus it stopped working. Now I’ve adjusted algorithm to be totally platform independent and work in the same way with all date-time datatypes, so I hope there will be no more such problems. Many thanks for sharing it with us.



no problem for long waiting…
I hope to see problem solved in the next beta drop.

Best regards.

Sergio Bertolotti


Just a note, this fix was not included in the beta build 229 that was published todays morning. It will be available with the next one.



OK. Many thank’s for your clarification.

Best regards.

Sergio Bertolotti


Hi Stanislav,

last beta of TOAD SS and the problem has benn solved.

Best regards.

Sergio Bertolotti


Glad to hear! And again many thanks to you for helping us make Toad better!