Forum Replies Created

Viewing 15 posts - 12,706 through 12,720 (of 15,381 total)

  • RE: How to deploy many stored procs to multiple DBs faster?

    30 seconds for dropping and creating over 200 procs does not sound unreasonable. It starts to get crazy when you have to run this on 1,000 db's. Suddenly you are...

  • RE: Trigger with a text datatype

    Easiest solution is to stop using the text datatype. It is deprecated and will no longer be supported in the future. Instead you should use (n)varchar(MAX).

  • RE: Filtering with @variables

    jcb (3/20/2012)


    Gail,

    I had found:

    WHERE (key1 = @key1 AND @key1 IS NOT NULL)

    OR (key2 = @key2 AND @key2 IS NOT NULL)

    OR (key3 = @key3 AND @key3 IS NOT NULL)

    makes better execution...

  • RE: Select unique records to insert

    codebyo (3/20/2012)


    SQLKnowItAll (3/20/2012)


    Why would you use both DISTINCT and GROUP BY? It is redundant for results if you are searching for true duplicates.

    EDIT: Sorry, you did not mention DISTINCT in...

  • RE: Double conversion

    joe.cahoon (3/20/2012)


    Would that work for a whole column of dates, or would I have to declare each on and convert them individually?

    OH LORD NO!!! :w00t: I was just showing you...

  • RE: Nested CASE statement with in operator

    You can't give your group by derived column an alias. Remove the "as Region" and you should be fine.

  • RE: Double conversion

    joe.cahoon (3/20/2012)


    Okay, so If I cannot convert from that format, is their a way to hide the time from being displayed?

    I think you maybe misunderstood what I was saying. Using...

  • RE: Double conversion

    joe.cahoon (3/20/2012)


    Thanks! I tried the Cast you mentioned above and it worked. Now the only thing is that it gives me the date in this format: 2010-12-03 00:00:00.000. All I...

  • RE: Procedure is taking much time

    Well it certainly isn't parameter sniffing...it is all the RBAR going on. There is no need to have nested loops for these inserts. If you want some help making this...

  • RE: Filtering with @variables

    drew.allen (3/20/2012)


    Sean Lange (3/20/2012)


    Drew I am curious if you have seen performance improvements with this multiple queries over the way I posted above. Or is it just personal preference?

    Just to...

  • RE: Filtering with @variables

    Thanks for the reminder Gail. I did not realize the performance was much of an issue when there is only 1 variable with the approach I took. I knew that...

  • RE: unable to connect to localhost

    It looks like maybe you are trying to connect to sql express? Did you use a custom instance name for SQL express?

    This article may provide some insight, assuming the services...

  • RE: Filtering with @variables

    drew.allen (3/20/2012)


    With only one parameter, the dynamic SQL option is probably overkill. Here is another option that I have seen, which is fine with only one parameter.

    IF @StaffID IS...

  • RE: parameters with multiple values used with procedure not run

    If you want an even faster splitter...and I mean orders of magnitudes faster...take a look at the second link in my signature. It explains why looping structures are horribly inefficient...

  • RE: Filtering with @variables

    To make this SARGable you should change this to not use the coalesce.

    Like this.

    SET @staffid = 1000

    SELECT * FROM TABLE WHERE Staffid = @staffid or @staffid is null

    This will let...

Viewing 15 posts - 12,706 through 12,720 (of 15,381 total)