Forum Replies Created

Viewing 15 posts - 1,786 through 1,800 (of 2,894 total)

  • RE: Grouping based on contiguous dates

    ...

    Try adding this into the original sample data

    SELECT 'Jun 1 2011 12:00AM','1','10','20' UNION ALL

    The results of the two queries are different.

    My query will only work if status never...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Primary Key: GUID vs. INT

    ...

    Why would you want to cache ranges of keys when using Guids? Makes no sense at all. The main reason for using guids if allocating keys in the front/middle tier...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: A Developer's scalar UDF is takeing this query from 3 seconds to over 5 minutes to run

    CELKO (3/26/2012)


    I hate XML inside SQL. I also hate CLRs and anything that is not pure SQL...

    Very puritan's american view :hehe:

    That is pure "culture of hate" propaganda...:w00t:

    Lets continue hate candidates:

    1....

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Grouping based on contiguous dates

    I still couldn't get it from your explanation, but looks like I do see now what you want ...

    Lets create some more test data (around 1.3 millions records)

    declare @i int

    set...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Primary Key: GUID vs. INT

    ...

    No they don't, but if doing client-side allocation of int values is horridly hard. Can't use a incrementing key without huge amounts of logic to check for/prevent race conditions, and...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Grouping based on contiguous dates

    Your sample data 1:

    MonthItemIDCount ACount B

    2011-01-01 00:00:0011020

    2011-02-01 00:00:0011020

    Expected:

    ItemID[Count A][Count B]Start Month End Month

    1102001/01/2011 00:0001/03/2011 00:00

    Your sample data 2:

    MonthItemIDCount ACount B

    2011-04-01...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Primary Key: GUID vs. INT

    GilaMonster (3/27/2012)


    Eugene Elutin (3/27/2012)


    Nothing wrong with a guid primary key...

    Nothing wrong! But with a real life experience you learn, that it would be much better to stick with INTs or...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Grouping based on contiguous dates

    If there is no 'next month' the the value is NULL (indicating the current state for the item).

    Which combination of id's in a sample data you gave has no...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: What is the difference between Sql server 2005 and sql server2008

    3

    2008 - 2005 = 3 :hehe:

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Grouping based on contiguous dates

    so we have

    MonthItemIDCount ACount B

    2011-01-01 00:00:0011020

    2011-01-01 00:00:002100200

    2011-02-01 00:00:0011020

    2011-02-01 00:00:002100200

    2011-03-01 00:00:0011525

    2011-03-01 00:00:002100250

    2011-04-01 00:00:0011525

    2011-04-01 00:00:002200250

    2011-05-01 00:00:0011525

    2011-05-01 00:00:002200250

    So the result I am after would be:

    ItemID[Count A][Count B]Start MonthEnd Month

    1102001/01/201101/03/2011

    1152501/03/2011NULL

    210015001/01/201101/04/2011

    220015001/04/2011NULL

    Could you please check...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Primary Key: GUID vs. INT

    Nothing wrong with a guid primary key...

    Nothing wrong! But with a real life experience you learn, that it would be much better to stick with INTs or BIGINTs for many,...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: EXEC sp t.C1 FROM Table t

    ...

    The worst part, is that even my boss knows there's a better way.

    It's just company protocol 🙁

    I know couple of good ones, who help companies going to administration.

    Company protocol stating...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to convert this XML into columns

    njdevils39 (3/23/2012)


    Can you expand my select statement to include the 4 columns I ask for from the rate_history field

    Yes, sure, no problem at all. It shows how to do exactly...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to convert this XML into columns

    Ah, I see! It is easy. We have done it before here. Link to solution:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: how to use like operator for this store proc or any other method?

    Click here: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 1,786 through 1,800 (of 2,894 total)