Just for information.
Together with Arnaud we created this small script to fill a PcVue database automatically.
DECLARE @countt bigint
SELECT @countt = 1
DECLARE @chrono bigint
SELECT @chrono = 130014720000000000 // 2013-01-01T00:00:00.000Z
DECLARE @date char(255)
SELECT @date = convert(datetime, GETDATE(), 126)
WHILE @countt <= 31622400
BEGIN
INSERT INTO BACKUP_SQL_BACKUP_DB.dbo.TRENDTABLE1
([Chrono]
,[Name]
,[Value]
,[Quality])
VALUES(
@Chrono,
'MAVAR',
@countt,
'192')
SELECT @countt=@countt+1
SELECT @chrono = @chrono + 10000000
CONTINUE
END
There is almost 31622400 seconds per year. This script will insert 31622400 values in the database from value 1 to 31622400.
Chrono is initialized at the first january midnight and is increasing each time per 1 second.
It takes around 10 hours to execute this script on an old computer and the database size is around 3 Gb at the end.
Very good!
Thanks Ludo and Arnaud
Hey do you have the CHRONO value for // 2012-01-01T00:00:00.000Z please?
Arnaud made a very usefull tool to convert Chrono to DateTime. I'll add it in the corresponding section.
For sur you are joking Nico!
You didn't know the magic Arnaud tool??? :whistle:
He told me that he may have forgotten... That's called "wisdom" (or becoming a bit old.... :whistle: )


