Forum Replies Created

Viewing 15 posts - 2,041 through 2,055 (of 5,590 total)

  • RE: Is there any advantage of using a clustered key in NC index?

    GilaMonster (12/29/2010)


    WayneS (12/28/2010)


    Just to ensure that I understand this correctly: if you explicitly add the CI column(s), they won't also be implicitly added?

    The columns just need to be there, it...

  • RE: Are the posted questions getting worse?

    Gianluca Sartori (12/29/2010)


    GilaMonster (12/29/2010)


    I am really struggling for inspiration for a 24hop abstract. Would a session title 'Bad plan! Sit!' intrigue people, or kill them with laughter?

    Both. In reverse order....

  • RE: SELECT TOP

    ronmoses (12/21/2010)


    For educational purposes, I would genuinely appreciate it if one of the folks who take issue with the "most of the time" factor could illustrate a scenario in which...

  • RE: SELECT TOP

    Just to point out that this code:

    IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE name like '#Customer%')

    DROP TABLE #Customer

    is NOT the proper way to test for the existence of a temporary...

  • RE: Is there any advantage of using a clustered key in NC index?

    Just to ensure that I understand this correctly: if you explicitly add the CI column(s), they won't also be implicitly added?

  • RE: Are the posted questions getting worse?

    Okay, I'm staying up too late. Watching Craig Ferguson, and a viewer asked what is the good answer in a job interview for "what are your weaknesses". Craig's answer: Job...

  • RE: Are the posted questions getting worse?

    Okay, let's talk about blogging. I've seen a few posts from time to time, but I don't recall seeing anything dealing with:

    (From a higher level) How to set up a...

  • RE: To find particular stored procedure when application is running slow

    crazy4sql (12/28/2010)


    if you have 2008 run activity mnitor for the instances.

    if you in 2005 there are dmvs to check this.

    Actually, it's SSMS 2008 that utilizes those DMVs to produce the...

  • RE: t-sql

    Jeff Moden (12/28/2010)


    wendy elizabeth (12/28/2010)


    Thanks! This sql works very well!

    It may not matter but it looks like that code will find table and view names in comments, as well, which...

  • RE: t-sql

    This will get a list of all datasets (tables/views) referenced in the definition for all procedures, with some limitations:

    1. If you have 2 tables named "Table1" and "Table11", and the...

  • RE: What Brand of Desktop is best these days?

    alen teplitsky (12/28/2010)


    after much thinking i'll probably buy a laptop next year along with an iPad and say goodbye to desktops for good.

    I went this route a few years ago....

  • RE: How to replace first occurrance of pipe delimeter

    If it will always be the first two characters that you want removed, just use the STUFF function:

    declare @str varchar(500);

    set @str = '| hello | world | I love sql...

  • RE: Performance challenge

    GSquared (12/27/2010)


    The first part is easy. It can be done in one Insert...Select if you just use the Row_Number() function.

    IF OBJECT_ID(N'tempdb..#Numbers') IS NOT NULL

    DROP TABLE #Numbers;

    CREATE TABLE #Numbers (Number...

  • RE: The Professional Student

    Jeff Moden (12/26/2010)


    Well done, Steve. I wish everyone would take command of their own ship and learn something new everyday.

    This is one of the things that I tried to...

  • RE: Get all months from Jan to Dec

    Here's a method that utilizes a small, recursive CTE:

    ;WITH Months (N, MyDate) AS

    (

    -- get the first day of the current year

    -- N is the MonthNumber

    SELECT 1, DateAdd(year, DateDiff(year, 0, GetDate()),...

Viewing 15 posts - 2,041 through 2,055 (of 5,590 total)