go to post Daniel Buxton · Oct 26, 2020 Hey All, I will close this post. Ended tweaking my application so instead of using a webservice to initially get the time and date in epoch, I used select now(). So my application now works as per below, it automatically deals with DST and epoch conversion to the required datetime format. var1 = select now() select COUNT ("Arrival Time") FROM dbo.table where "Arrival Time" < var1
go to post Daniel Buxton · Oct 21, 2020 oh yeah getting closer. It looks like the webservice I am using is actually sending me UTC Time and I need to convert to my timezone select DATEADD(ms, CONVERT(string,LEFT(1603274296000+39600000, 20)), '1970-01-01 00:00:00') adds 11 hours and shows my current time of 2020-10-21 20:58:16
go to post Daniel Buxton · Oct 21, 2020 Hey Julius, I intended to write select COUNT ("Arrival Time") FROM dbo.table where "Arrival Time" < DATEADD(ms, CONVERT(int,LEFT(1603173432000, 20)), '1970-01-01 00:00:00') However it is returning a count of 0. 1603173432000 being 2020-10-21 13:00:00 so there should be a COUNT of 2 Arrival Time 2020-10-21 12:50:05 2020-10-21 12:57:56 2020-10-21 13:42:11 It is just testing ATM but I dont epect the table to be more than 100 rows as old records get deleted.
go to post Daniel Buxton · May 11, 2020 Hey Robert, Thanks very much for this. It looks like I am closer but getting [SQLCODE: <-131>:<After Insert trigger failed>] [%msg: <21003,Cannot INSERT "NIActivityCode" because number is already used.>] @Benjamin De Boe - thanks for letting me know its not available, I just figured I had a comma or apostrophe in the wrong place so I would have kept going around in circles. It does let me INSERT a single row including the ID so yeah perhaps I will just have to do one at a time if I cannot get Roberts solution going
go to post Daniel Buxton · May 11, 2020 Hey Rob, Thanks for replying. Yes I have had a look at that but it looks to me that the example copies existing data from another table. I just want to add a bunch of new rows with one manual command. I am afraid I am not an SQL guy so are you able to help reformat the below? INSERT INTO ccms.NIActivityCode (ID, CustID, ActivityCode, Name, ShortName, CreateDate, Type, Server)SELECT '1||1||102', '1', '102', 'Test1', 'test1', '2020-01-01 10:37:00', '4', '1'UNION ALLSELECT '1||1||103', '1', '103', 'Test2', 'test2', '2020-01-01 10:37:00', '4', '1'UNION ALLSELECT '1||1||104', '1', '104', 'Test3', 'test3', '2020-01-01 10:37:00', '4', '1'UNION ALL As far as I can tell the 'standard' SQL is formated as per below but that also didn't work INSERT INTO ccms.NIActivityCode (ID,CustID,ActivityCode,Name,ShortName,CreateDate,Type,Server)VALUES ('1||1||102','1','102','Test1','test1','2020-01-01 10:37:00','4','1'),('1||1||103','1','103','Test2','test2','2020-01-01 10:37:00','4','1'),('1||1||104','1','104','Test3','test3','2020-01-01 10:37:00','4','1');
go to post Daniel Buxton · Sep 23, 2019 Hey Kenneth, I am not shadowing or mirroring. I managed to get past this error and get everything back up. Journal Files now exist in a new drive. Can I now do full backups and restores or is that now broken due to incomplete journal files?
go to post Daniel Buxton · Sep 23, 2019 Hey Robert, Thanks heaps, yes I found in cconsole.log file telling me to start cache as cache -sd:\bin\cache\cachesys\mgr -B I was then in the SYS namespace and ran Do ^STURECOVI disabled the Journal from the interactive menu, was able to start cache. I then did this process again and re-enabled journing. I am pretty sure the interactive menu went DO ENABLE^%NOJRN I noticed that jounaling files are back on my new drive and it did say journaling files lasts the last 2 backups or 2 days. So I take it since I am not shadowing, journaling is not essential?
go to post Daniel Buxton · Aug 4, 2019 Product=EnterpriseLicense Type=Concurrent UserServer=MultiPlatform=HeterogeneousLicensed Users=10000Licensed Cores code=0Authorized cores=unlimitedExtended feature codes=004100 DeepSee Run enabled. DeepSee Visual Reporting Execute enabled.