 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[12.1.277 Pro] - Formatting corrupts code (MSSQL) |
|
For some unknown reason this code
 |
 |
DECLARE @ma date = CAST(GETDATE() AS date);
|
becomes
 |
 |
DECLARE @ma date = .CAST(GETDATE() AS date);
|
after formatting. It gets a surplus period in front of CAST.
|
|
Thu Apr 07, 2022 11:20 am |
|
 |
Mindflux
Joined: 25 May 2013 Posts: 846 Country: United States |
|
|
|
Just formatting that line here does not exhibit this issue. Perhaps it's a formatting rule you have in place?
|
|
Thu Apr 07, 2022 11:26 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I'm guessing that somewhere in a custom formatting rule you got 4 dots in place of 3 dots wildcard.
|
|
Thu Apr 07, 2022 1:32 pm |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
I've thought about that but there are only two consecutive 4-dot combos in the entire sqlassist.sas file. Both are snippet captions, one for MariaDB and the other one for MySQL. The affected formatting is SQL Server. It's been quite a while since I last did major stuff in SQL Server so I'm reasonably certain I didn't change anything in formatting rules recently. I'm not sure but I guess this started after I upgraded to v12.1.
UPDATE: culprit found. I've got a formatting rule for DECLARE
 |
 |
DECLARE @... ... = ...;
|
I changed it to
 |
 |
DECLARE @... = ...;
|
and does not ruin the code anymore, but I have a vague recollection of having a very good reason for putting that middle set of 3-dots there. Alas, I no longer remember what it was. I'm afraid I'll be enlightened very soon.
|
|
Fri Apr 08, 2022 4:02 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|