Forum Replies Created

Viewing 15 posts - 2,686 through 2,700 (of 5,502 total)

  • RE: Averaging based on a condition TSQL

    What would be your expected result if there are more than one row per id where either one row has the value 9999.9999 or all rows or sum = 9999.9999...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to find no of employees whose startTime differs by 0hrs,with 2hrs.

    I noticed this is at least the 4th thread you opened on the very same issue (with minor changes to the required output but all requests are related to the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Should i use outer join?

    I strongly recommend NOT to use a VARCHAR() column to store date information (including not using a lenght of 12 when you know there's always a lngth of 3...) :pinch:

    It...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: What is Best Way to calculate presence time....

    Here's my approach.

    I took a while since I had to figure out how the calcualtion is done...

    If my reverse-engineering failed you have to modify the aggregation to meet your requirement....



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Delete record without using Delete keyword

    PaulB-TheOneAndOnly (10/19/2010)


    LutzM (10/16/2010)


    Before going any further I'd like to know the true reason why you don't use the simple DELETE statement.

    Well... imagine we are in the year 2030 and...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Debugging Stored Procedure with looping cursor

    sqwasi (10/19/2010)


    Thank you Lutz and Drew. Drew, I will adjust my query accordingly. That makes sense. I also figured out that when tries to calculate my average...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Debugging Stored Procedure with looping cursor

    I'm not sure if the c.u.r.s.o.r. will provide the results you're looking for...

    It would really help a lot if you could provide some more details (table def, sample data and...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Delete record without using Delete keyword

    Cldewar (10/19/2010)


    LutzM (10/19/2010)


    Cldewar (10/19/2010)


    How about data disappeared from my table and there are no deletes in any of my procedure. What could have done this?

    I encountered a problem where...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Debugging Stored Procedure with looping cursor

    Well, when using a *cough* c.u.r.s.o.r. you're processing one row at a time (also called RBAR - row by agonizing row). SQL Server is optimized to deal with sets. A...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Delete record without using Delete keyword

    jaffrey (10/17/2010)


    LutzM (10/16/2010)


    jaffrey (10/16/2010)


    Before going any further I'd like to know the true reason why you don't use the simple DELETE statement. Also, please describe the business case you're working...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Delete record without using Delete keyword

    Cldewar (10/19/2010)


    How about data disappeared from my table and there are no deletes in any of my procedure. What could have done this?

    I encountered a problem where the delete...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Debugging Stored Procedure with looping cursor

    Option 1:

    move the FETCH part from the IF section to the outer section.

    So, instead of

    if (@ProfCOD1 <> 'YES')

    ...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: What is Best Way to calculate presence time....

    I'm very sorry, but the main reason you didn't get an answer yet is still an incomplete requirement: We have the table and the data in a ready to use...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: cross apply xml variable and table

    Unfortunately, your sample data cannot be used since there are a few tabl DDL missing. Please modify.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: very big XML

    It looks like it's possible to replace one or two of the UNION with a CASE statement.

    It also migt be a good idea to use the "divide'n'conquer" method, meaning to...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 2,686 through 2,700 (of 5,502 total)