 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[SA 6.4.199 preview] Header anomaly |
|
Both '-- header' and '/* header */' style headers are inserted each time the script is formatted. The result for header
 |
 |
-- $DATE$ $TIME$ Formatted to SQL Server default by $LOGIN$
|
is
 |
 |
-- 2013.05.22. 09:16:28 Formatted to SQL Server default by deva_gem
-- 2013.05.22. 09:16:26 Formatted to SQL Server default by deva_gem
-- 2013.05.22. 09:16:25 Formatted to SQL Server default by deva_gem
SELECT
s.[status]
,s.fileid
,s.[name]
,s.[filename]
FROM
dbo.sysfiles1 AS s
|
when applying the formatting three times.
Header
 |
 |
--/* $DATE$ $TIME$ Formatted to SQL Server default by $LOGIN$ */
|
works properly (that is, it is replaced on subsequent formatting yet it has a glitch as well. Surplus blank lines at the beginning of the script are not removed at the first formatting (when there is no header yet) but they are after applying the formatting the second time (when there is a header present).
|
|
Wed May 22, 2013 3:24 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Well, the header text is just one line and it contains variable $TIME$, so the formatter is likely having difficulties identifying it for sure as a system generated comment. Can you please change the header to 2 line starting with a fixed text, not a variable date-time value?
|
|
Wed May 22, 2013 8:30 am |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Confirmed, modifying it to be two lines makes the anomaly vanish. Moving the variables deeper into the header like
 |
 |
-- Formatted to SQL Server default at $DATE$ $TIME$ by $LOGIN$
|
works as well. I guess I'll just leave the hybrid --/* ... */ one. It's somewhat more header-like, being different from the ordinary comments.
|
|
Wed May 22, 2013 8:43 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
|
|
|