Forum Replies Created

Viewing 15 posts - 2,416 through 2,430 (of 2,451 total)

  • RE: Removing tags stored in a ntext field

    jshahan (7/25/2012)


    XMLSQLNinja, thank for your time and alternative approach. I'm afraid that the garbage in my data is not well formed and this method stumbles as a result as...

  • RE: Get running total in the following query

    Lynn Pettis (7/25/2012)


    Thoughts? It all depends on where you run the code. On my development VM the Quircky Update beats your rCTE every time. Using your code...

  • RE: Get running total in the following query

    Lynn Pettis (7/23/2012)


    Okay, now modify the rCTE to run against this dataset. It will contain 1,000,000 rows of data and potentially 10,000 unique cID's, not 1 (cID = 123)...

  • RE: Get running total in the following query

    Gosh, that's quite confrontational.

    My sincere apologies if I came off as confrontational; that was not my intent.

    I, too, get quite a bit of information on the Internet...

  • RE: Get running total in the following query

    Jeff Moden (7/23/2012)


    XMLSQLNinja (7/23/2012)


    ChrisM@home (7/20/2012)


    XMLSQLNinja (7/18/2012)


    ...

    There are other ways to do this but using recursion is generally the fastest.

    Recursion is the third fastest; CLR > "Quirky Update" > rCTE >...

  • RE: Removing tags stored in a ntext field

    Oky Doky.

    Just got back from vacation and wanted to get to this ASAP. I am not optimizing this query, just getting the desired results for now.

    First, no UDF needed....

  • RE: Get running total in the following query

    ChrisM@home (7/20/2012)


    XMLSQLNinja (7/18/2012)


    ...

    There are other ways to do this but using recursion is generally the fastest.

    Recursion is the third fastest; CLR > "Quirky Update" > rCTE > cursor > triangular...

  • RE: Get running total in the following query

    Just got back from vacation and wanted to address this one first...

    I must be missing something but I don't see how that recursive CTE (as much as I like...

  • RE: Database update from web page

    First thought was that we would connect to current db and do updates directly (validating fields before update).

    Good Grief! First and foremost - NEVER do that. As a DBA,...

  • RE: Need help in T-sql to get the Last Year's first 4 week sales data

    First, by "count of" sales I assume you mean SUM of sales. Otherwise we'd be looking at a result set a little more like:

    WeekEndDate SalesTotal

    2011-01-07 1

    2011-01-14 1

    2011-01-21 1

    2011-01-28 1

    Lets try...

  • RE: Get running total in the following query

    Sean Lange (7/18/2012)


    See if this article helps. http://www.sqlservercentral.com/articles/T-SQL/68467/[/url]

    Jeff's article is certainly a must-read on this topic.

  • RE: Get running total in the following query

    a2zwd (7/18/2012)


    Hi

    I have a table which holds the running total.

    DECLARE @CumCredit TABLE(RowId INT, CustomerId INT, TransId INT, Pts INT, RunningTotal INT)

    INSERT INTO @CumCredit VALUES(1,123,121,10,10), (2,123,131,20,30), (3,123,141,15,45)

    New resultset which needs to...

  • RE: how to login into ssms

    harri.reddy (7/17/2012)


    hi

    i need to add my user name into ssms,how to login first in order to add another user.

    like sa or what password?

    First, a little more detail would help here....

  • RE: xp_cmdshell

    SQLSACT (7/17/2012)


    Hi All

    How would I setup a script to copy files from a shared location on one server, to a shared location on another server?

    The extension of the files would...

  • RE: restricting values a variable can be assigned

    dndaughtery (7/17/2012)


    Is there a way to do it in the declaration?

    I was told someone interviewing me would ask this. In my 7 years of DB Development Ive never had a...

Viewing 15 posts - 2,416 through 2,430 (of 2,451 total)