SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 6.4.199 preview] Header anomaly

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 6.4.199 preview] Header anomaly
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post [SA 6.4.199 preview] Header anomaly Reply with quote
Both '-- header' and '/* header */' style headers are inserted each time the script is formatted. The result for header
Code:

-- $DATE$ $TIME$ Formatted to SQL Server default by $LOGIN$



is
Code:

-- 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
Code:

--/* $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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
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 View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
Confirmed, modifying it to be two lines makes the anomaly vanish. Moving the variables deeper into the header like
Code:

-- 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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.