Forum Replies Created

Viewing 15 posts - 1,216 through 1,230 (of 2,007 total)

  • RE: Are the posted questions getting worse?

    Can someone take over from me here please? I've had enough of trying to draw blood from a stone, maybe I'm phrasing things incorrectly?

  • RE: How to replace While Loop in place of Cursor

    MSBI Learner (12/6/2011)


    Yeah, I have sent... hope that helps you to work on my issue.

    Please let me know if you need any more information on the same.

    As I've said repeatedly,...

  • RE: How to replace While Loop in place of Cursor

    MSBI Learner (12/6/2011)


    Thank you, I have sent the script of my SPROC.

    One more try 😉

    Sorry, but without DDL, sample data and expected results there isn't much I can do. ...

  • RE: How to replace While Loop in place of Cursor

    I'm going to re-iterate what I said before. . .

    CURSORS and WHILE LOOPS are both generally bad, if you're tuning your query then maybe you should look at a more...

  • RE: HELP wanted in advanced group by, - thanks.

    ckri (12/6/2011)


    that was quick - thanks a lot and thanks for introducing PARTITION

    but I'm not sure ....

    it seems to display the wrong row in example .... the row with 21...

  • RE: How to replace While Loop in place of Cursor

    MSBI Learner (12/6/2011)


    Yes – my motto is to improve the performance of my Stored Procedure. Yes – I can provide you the required information, would you mind to provide me...

  • RE: How to replace While Loop in place of Cursor

    CURSORS and WHILE LOOPS are both generally bad, if you're tuning your query then maybe you should look at a more set-based approach?

    If you provide readily consumable sample data, DDL...

  • RE: HELP wanted in advanced group by, - thanks.

    Fairly trivial.

    BEGIN TRAN

    --First, lets create some sample data

    SELECT MSLINK, RAPP, LASTDATE, FILMNAME, OBS, ID

    INTO #tvrapp_SampleData

    FROM (SELECT 102141, '1279', '1995-02-02 00:00:00.000', '440-CA0010R-CA0020R.mpg', 22, 14422

    UNION ALL...

  • RE: Complex joins

    Enjoyed that one, would've been even better on a Monday morning to get the juices flowing! 😀

    Flabbergasted that so many people are getting it incorrect. . . I assumed that...

  • RE: GetBytes function

    spin (12/5/2011)


    Hi All

    i've created a table locally from a linked server view. When try to do a select * from .... i get

    An error occurred while executing batch.

    Error message...

  • RE: PIVOT Question

    Guess based on Gianluca's interpretation of your data: -

    SELECT pvtData.DESCRION AS Team, pvtData.[Primary], pvtData.[Secondary],

    pvtData.[Tertiary], pvtData.[Other]

    FROM (SELECT DESCRION, CASE WHEN MBR_SEQ_NUM = 1

    ...

  • RE: DATEDIFF Question

    GSquared (12/1/2011)


    You can actually change the zero date at a server-level, so test it before you count on that. Won't matter if it's being used to strip parts off...

  • RE: Extracting Documents (.pdf, .doc, .xls, etc) stored in image type fields in multiple rows

    This might help.

    Without sample data and DDL it's the best I can offer.

    SELECT ID, name, content, previous_id

    INTO #yourTable

    FROM (SELECT 1, 'doc1.doc', 'abc', -1

    UNION ALL...

  • RE: DATEDIFF Question

    Kwisatz78 (12/1/2011)


    Hi

    Can anyone tell me what the 0 does in the following:

    SELECT DATEDIFF(m, 0, '01/01/2011');

    Does it indicate the start of time as far as SQL goes and if so what...

  • RE: Disable all the SQL jobs at once

    DECLARE @SQL AS VARCHAR(MAX)

    SELECT @SQL = COALESCE(@SQL+ + CHAR(13), '') + 'EXEC msdb..sp_update_job @job_name = ''' + name + ''', @enabled = 0;' FROM msdb.dbo.sysjobs

    EXEC (@SQL)

    I'd do what G-Squared suggested...

Viewing 15 posts - 1,216 through 1,230 (of 2,007 total)