Forum Replies Created

Viewing 15 posts - 16 through 30 (of 1,155 total)

  • RE: Exporting SSIS package in SQL SERVER 2008 R2

    You will have to get into the SSIS package and look at the underlying objects/code. They can be using the confiuration file for some things/connections and not others. ...

  • RE: Querying Week Start date

    You could do something like this:

    DECLARE @NbrWeeks INT

    SET @NbrWeeks = 13

    SELECT weekstartdate

    FROM @weeks


    and weekstartdate <= DATEADD(WEEK,@NbrWeeks,DATEADD(DAY,-2,DATEADD(WEEK,DATEDIFF(WEEK,0,GETDATE()),0)))

  • RE: Datetime and sp_executesql Issue

    RovanSQL (6/13/2012)

    Here's part of code i've been trying to run in a procedure, cursor is already defined:

    DECLARE @form_dates CURSOR

    SET @form_dates= CURSOR FOR

    SELECT courseid, registrationdate, completeddate

    FROM tblname

    WHERE UserID...

  • RE: compare bit values without using multiple or's

    I don't know if it is applicable here, but this may be a good candidate for CDC, if you are using 2008, to detect if a change has been made...

  • RE: How to Setup Log Shipping for Multiple Databases

    Great article! This is defintely a more managable solution compared to 130 Agent jobs, but one caveat to be careful with is serial processing. Now that your process...

  • RE: Default trace - A Beginner's Guide


    The script in the article does use the objectname counter to return the object, if all of your objects are returning null, you may have a filter where objectname is...

  • RE: Need a Help from XML to TEmp table

    Hi Saravanan,

    I am not really sure what you are trying to do, but the first thing you have to do is convert the xml using convert with the style of...

  • RE: Default trace - A Beginner's Guide

    You have to be in the right database for object_name() to return the right name for a given object_id. For example, an object_id for a table or procedure in adventure...

  • RE: Tally Table Uses - Part II

    Thanks for the article. I have actually used this technique myself and find it very useful. I do a little more filtering to get the unwanted characters. ...

  • RE: Terrible code, trying to tweak

    Looks like you are missing statistics and it looks like you may have tempdb contention. The hash join is probably consuming a lot of tempdb space and resources due...

  • RE: Terrible code, trying to tweak

    I agree a temp table will server better here because the optimizer does not maintain statistics on table variables, so the optimizer is going to assume 1 row in the...

  • RE: Output Clause

    While the OUTPUT clause does have limitations is it perfect for this type of action. You cannot directly insert into a table with keys as suggested, but you can...

  • RE: Help with using mulitple replace in a function

    I agree that this "may" perform better as CLR; however, if I were stuck doing this in TSQL. I would create a blacklist table, that housed the characters I...

  • RE: spliting a varchar(max) into multiples

    Since we have a known number of columns, we could technically split the data via a split function and then use PARSENAME to split the other data for us.

    It makes...

  • RE: Query using right function in where clause is failing

    Michael Valentine Jones (7/21/2010)

    Adam Haines (7/21/2010)

    No need for a computer column here. You should use the like operator.


    col VARCHAR(10)


    INSERT INTO @t VALUES ('13abc');

    INSERT INTO @t VALUES ('1abcde');


Viewing 15 posts - 16 through 30 (of 1,155 total)