I insert the SQL statement into the table with two dates, but I use it on different machines with different SQL Server and install the language. Sometimes "2017-01-04 00:00:00" is April 01, 2017, sometimes it is January 4, 2017. I want April 01th.
INSERT INTO [table] ([id], [value], [datefrom], [dateto]) SELECT NEWID(), 3.5, '2017-01-04 00:00:00', '2027-01-05 00:00:00' FROM [settings]
Is it possible to use only SET LANGUAGE german; at the beginning of the script, and this parameter is temporary only for the instruction and does not change the language forever? Or is this not the best way? See the instructions below. Thanks in advance.
SET LANGUAGE german; INSERT INTO [table]([id], [value], [datefrom], [dateto]) SELECT NEWID(), 3.5, '2017-01-04 00:00:00', '2027-01-05 00:00:00' FROM [settings]
source share