Forum Replies Created

Viewing 15 posts - 151 through 165 (of 183 total)

  • RE: SQL Alerts

    Sorry for the delay.. due to company policy I can not provide you with the exact code we use. However, I wrote a real quick example that will work...

  • RE: SQL Alerts

    I wrote a little .NET application that accepts a paramter message and sends emails with that subject/message. Then in Windows, Control Panel, Services.. you can set the REcovery option...

  • RE: What order do you do maintenance tasks in?

    The interesting thing for me so far is I do a backup first and then run all my maintenance. I understand your points. I have always been of...

  • RE: CASE vs Pivot

    I asked a similar question and someone provided me with this article from this site. It has some good performance insights to consider when using pivot or case statements.

    http://www.sqlservercentral.com/articles/T-SQL/63681/[/url]

  • RE: truncate decimal places Sql Query

    Not the best solution.. but you can always cast as an int data type if you don't need the precision of a decimal.

    declare @d as decimal(9,3)

    set @d = 339.55

    select CAST(ROUND(@d,...

  • RE: Disable Automatic Email Notification

    Thanks

  • RE: Disable Automatic Email Notification

    I guess thats what I mean.. where in there? Right now I have to disable every topic i ever participated in. When I create a new post, I...

  • RE: Choosing the right SQL edition

    You can install multiple databases, instances, drive locations, etc on all versions of SQL. Enterprise will get you additional features like advanced clustering (std provides basic clustering), data partioing,...

  • RE: Choosing the right SQL edition

    I agree with the last post, it really depends on your needs and the requirements of the software, etc. No one will be able to say do "X" wihtout...

  • RE: CAST Integer to Character with leading zeroes

    HA! Short indeed.. but the post asked for a character based result. But koodos if the string data type is not really needed.

  • RE: White Space In SQL Server 2005

    What version? I just ran the code to see what I get... and I have the same mis representation. My version is:

    Microsoft SQL Server 2005 - 9.00.3042.00...

  • RE: varchar(MAX) or nvarchar(MAX) not satisfying my requirement

    Someone may correct me, but I believe there is an issue with the print statement truncating. Check the length of the string to see if it is what you...

  • RE: CAST Integer to Character with leading zeroes

    Nice.. I almost did it without the REPLICATE() function. Always felt it was more typing than needed. 🙂

  • RE: White Space In SQL Server 2005

    I'm interested to see the cause. I would have said the same thing about ANSI Padding. You could use the DATALENGTH() function instead which should get you what...

  • RE: CAST Integer to Character with leading zeroes

    How about this, not sure how short you want it

    DECLARE @Int AS INT

    SET @Int = 1

    SELECT RIGHT(REPLICATE('0', 6) + CAST(@Int AS VARCHAR(6)), 6)

Viewing 15 posts - 151 through 165 (of 183 total)