Forum Replies Created

Viewing 15 posts - 12,766 through 12,780 (of 14,953 total)

  • RE: No.of Business Days between two dates

    Best solution for this kind of this is to build a calendar table.

    Workdays between two dates isn't the same as datediff(day), because it doesn't count weekends or holidays. The...

  • RE: many stored procedures vs 1

    From a DBA point of view, I'd go with multiple procs, no master proc. From a "make life easy on the devs" point of view, I'd go with the...

  • RE: A Simple Question about the Len function

    If you want to know why it works that way, take a look at the article on ANSI_Padding in Books Online. Tells you exactly why and how it works.

  • RE: SQL Server Management Studio Vs Enterprise Manager

    Take a look at "SQL Server Agent Fixed Database Roles" in Books Online. That should give you what you need to fix this.

  • RE: Pulling Together

    Someguy (7/17/2008)


    I once heard someone ask the question: "How much time to you spend at your job vs how much time do you spend at home?" ....

    Heck, I'm often still...

  • RE: Sparse Columns

    I answered "Indeterminate", based on the same data that Hugo wrote up. I understand the point of the question and its answer, but this is a limited-case scenario.

  • RE: Index on uniqueidentifier column

    You might check to see if the PK is the clustered index, and what level of fragmentation it's sitting at if so.

    You might also check to see if the table...

  • RE: problem altering char(10) to varchar(10) and trimming values

    The second IF checks if the column exists, and only runs if it doesn't. How is code supposed to alter a non-existent column? Change the comparison to >...

  • RE: remove spaces more than double

    Nope. That comes from me editing (I changed some stuff for clarity) after I tested. It's a typo. (Par for the course today. I try to...

  • RE: How to create a server level role in 2005

    DKG (7/16/2008)


    isnโ€™t it a good idea to create a role instead of give permission on each object, because if another user comes with the same requirement, i m goona add...

  • RE: remove spaces more than double

    Makes sense. (I didn't actually click through the link, because I kind of overlooked it in my overenthusiam for testing.)

    On the original test table, with 1-million rows, that nested...

  • RE: Importing Problem

    Create a staging table that has the columns, but no constraints/indexes on it. Then clean up the data (remove the duplicate) and insert...select into the table with the constraints.

  • RE: How to create a server level role in 2005

    You can grand execute rights on every proc in a database, but I don't know how to grant execute rights to every proc in every database on a server, except...

  • RE: remove spaces more than double

    RyanRandall (7/16/2008)


    As usual, different methods will be better in different situations. They're all tools for the toolbox ๐Ÿ™‚

    GSquared, your last idea also cropped up in 2002...

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=21511

    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(colname,

    ...

  • RE: Alert message on failure JOB

    Does the account SQL Agent is running under have the necessary rights to execute sp_send_dbmail? How about the account the job is running under (if that's different)?

Viewing 15 posts - 12,766 through 12,780 (of 14,953 total)