Forum Replies Created

Viewing 15 posts - 241 through 255 (of 1,048 total)

  • RE: Custom Ranking?

    WElcome to the SSC 🙂

    can you please provide some information about your requirement? Its not clear to us..

    Please follow the link in my signature about how to post a question,...

  • RE: Space taken by Null !

    Adding some more points to the problem:

    inspite of defining columns as SPARSE it is still taking space in database as I read on some blog that if we specify column...

  • RE: Space taken by Null !

    Instead of delete if you fire TRUNCATE statement it will show data size is 0

  • RE: Eliminate Cursor

    Cadavre (8/21/2013)


    kapil_kk (8/21/2013)


    Yes, I have used MERGE before but not in much depth like this....

    USING (SELECT a,b,c

    FROM @tblTempTable) [Source](a,b,[bit]) ON [Target].AccountOfficeId =...

  • RE: Eliminate Cursor

    Koen Verbeeck (8/21/2013)


    kapil_kk (8/21/2013)


    Can anyone tell me from where I can learn about this SET Based approaches?

    Try reading articles by Jeff Moden.

    The key here is to avoid cursors and WHILE...

  • RE: Eliminate Cursor

    Cadavre (8/21/2013)


    kapil_kk (8/21/2013)


    Cadavre (8/21/2013)


    kapil_kk (8/21/2013)


    Koen Verbeeck (8/21/2013)


    Sure. This is one of the examples where you don't need a tally table.

    You can replace the logic beneath @bit = 1 with one...

  • RE: Eliminate Cursor

    Can anyone tell me from where I can learn about this SET Based approaches?

  • RE: Eliminate Cursor

    Cadavre (8/21/2013)


    kapil_kk (8/21/2013)


    Koen Verbeeck (8/21/2013)


    Sure. This is one of the examples where you don't need a tally table.

    You can replace the logic beneath @bit = 1 with one MERGE statement.

    The...

  • RE: Eliminate Cursor

    Koen Verbeeck (8/21/2013)


    Sure. This is one of the examples where you don't need a tally table.

    You can replace the logic beneath @bit = 1 with one MERGE statement.

    The logic beneath...

  • RE: Eliminate Cursor

    Hi Koen,

    here is one sample of cursor that is used in one of the object:

    DECLARE curApplication CURSOR FAST_FORWARD LOCAL FOR

    SELECT a,b,c FROM @tblTempTable

    OPEN curApplication

    FETCH NEXT FROM curApplication

    INTO @a,@b,@bit

    WHILE @@FETCH_STATUS=0

    ...

  • RE: Avoid LEFT join

    npranj (8/20/2013)


    Thanks Kapil. It wont work because we need a join with the ID. NEed to check TimeId against each Person ID.

    Got the query. IT was simple. -

    select PDD.*

    ...

  • RE: Stored Procedure Having More than 1000 Lines

    have you checked the execution plan?

  • RE: Avoid LEFT join

    try this_

    select t1.PersonID, t1.LeaveTimeId

    FROM tbl_PersonDetails t1

    JOIN tbl_PersonLeaveDetails t2 ON t1.PersonID = t2.PersonId

    WHERE t1.LeaveTimeId NOT IN (select t1.LeaveTimeId FROM tbl_PersonLeaveDetails t2 WHERE t1.LeaveTimeId BETWEEN t2.LeaveFromTimeID AND t2.LeaveToTimeID)

  • RE: Shortcut for Views.

    you question is not clear to us...

    untill you dont provide some more details what you required we cant able to help you

  • RE: TSQL - Identity_Insert

    Good question to start the day 🙂

Viewing 15 posts - 241 through 255 (of 1,048 total)