Forum Replies Created

Viewing 15 posts - 3,841 through 3,855 (of 5,590 total)

  • RE: Cursor

    HoustonFirefox (7/6/2010)


    I personally hate cursors and try not to use them if at all possible. In keeping with our TSQL roots I submit:

    DECLARE @Database VARCHAR(255)

    DECLARE @DBList TABLE (DBName varchar(255),...

  • RE: Loop, Cursor or both?

    george.greiner (6/29/2010)


    Okay here is the data and tables you asked for assuming I did this correct.

    --===== If the test table already exists, drop it

    IF OBJECT_ID('TempDB..#FileInfo','U')...

  • RE: Select Count Help

    This link is an excellent place to start.

  • RE: How to do - While Loop, Courser, CTE ???

    keyun (7/6/2010)


    WayneS - It are correct, My sp runs daily but at some point there db goes off line and do not have connection but as soon as connection open...

  • RE: Are the posted questions getting worse?

    Be still, my heart!

    Jeff's now teaching how to write a c.u.r.s.o.r.

    :w00t:

    (Who would have thought he would be able to even write one??? ;-):-P )

  • RE: How to do - While Loop, Courser, CTE ???

    If I'm reading this correctly, you need a separate file for each day. If so, then it sounds like you need two basic steps:

    1. Procedure to generate output file for...

  • RE: query each table in list of table names

    You can't reference a table by a variable. To get around this, you will have to use dynamic sql.

    Something like:

    declare @SqlCmd nvarchar(max)

    set @SqlCmd = 'INSERT INTO #RowCounts(TableName,NumRows)

    SELECT ''' + @TBL...

  • RE: Split string using Tally Table

    jts_2003 (7/2/2010)


    I think this is an example of why people don't like to use OVER, since it's so hard to work out what might/will be returned!

    I'd like to see a...

  • RE: Are the posted questions getting worse?

    Since there's a bit of talk going on about topics to present and such, I'd like to get some input from some of the Threadizens...

    I've been contemplating making a presentation...

  • RE: Split string using Tally Table

    I have to admit ... I was looking at this and saying "What the heck???"

    For all those interested, the latest version of the "DelimitedSplit8k" function can be found here.

  • RE: Are the posted questions getting worse?

    Steve Jones - Editor (7/1/2010)


    What did I do?

    I'm not renewed now. And perhaps I won't be if PASS gets to weigh in.

    Well, it DOES list you in it. Guess you're...

  • RE: splitting column into three

    NEAL-464478 (7/1/2010)


    Is it possible to strip out DESTINATION field into three

    Yes it is. However, the people that help out here are all un-paid volunteers, so please HELP US HELP...

  • RE: deadlock by 2 triggers on same table

    KBSK (7/1/2010)


    I just ran the 1st insert statement with Actual Execution plan set to on and I was totally surprised to see a error message:

    "The query has exceeded the maximum...

  • RE: CTE - Avoiding the cursor

    Brandie Tarvin (7/1/2010)


    Looks like I'm stuck with cursors still, but I'm well on my way to a solution.

    Why are you still stuck with cursors? What else needs to be done...

  • RE: XML to Table

    I couldn't get it to work with the "encoding" set, so I'll let you tackle that.

    The rest of this shows you how to get those results:

    declare @xml xml

    --encoding="UTF-16"

    set @xml...

Viewing 15 posts - 3,841 through 3,855 (of 5,590 total)