November 18, 2014 at 8:56 am
I was thrilled to find this "briefcase" option where I could open a newly found script in SSMS, but alas, I open the script to find all the HTML tags instead of the quotes ' , etc. that should be there. Here is an example of what I get in the preview pane AND the actual SSMS script:
DECLARE @Today smalldatetime
DECLARE @FirstOfMonth smalldatetime
DECLARE @Year varchar(4), @Month varchar(2)
SELECT @Today = GetDate()
SELECT @Year = CONVERT(varchar(4), DATEPART(yy, @Today))
SELECT @Month = CONVERT(varchar(2), DATEPART(mm, @Today))
SELECT @FirstOfMonth = CONVERT(smalldatetime, @Year + '-' + @Month + '-' + '1')
SELECT 'End Of the Last Month', DATEADD(dd, -1, @FirstOfMonth)
SELECT 'End Of the Current Month', DATEADD(dd, -1, DATEADD(mm, +1, @FirstOfMonth))
SELECT 'End Of the Next Month', DATEADD(dd, -1, DATEADD(mm, +2, @FirstOfMonth))
SELECT 'Beginning Of the Last Month', DATEADD(mm, -1, @FirstOfMonth)
SELECT 'Beginning Of the Current Month', @FirstOfMonth
SELECT 'Beginning Of the Next Month', DATEADD(mm, +1, @FirstOfMonth)
Interestingly enough, when I posted this code, the preview window encoded the HTML tags, so you can't see the problem. But after each SELECT keyword, there is a space and an ampersand &, a number sign or hash mark #, and the number 39.
It turns out I cannot use these scripts as I cannot figure out what is a tag and what is not in some things. It also has semi-colons and I don't know what these translate to.
Can you tell me what is wrong with my addin and what I can do to correct it? Or maybe SSC can register it as a bug and work on it. Otherwise, the addin is useless to me.
I am running Windows 7 64bit and SQL Server 2008 R2 with SSMS on my machine and I use it to connect to databases on the network.
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy