Forum Replies Created

Viewing 15 posts - 6,256 through 6,270 (of 7,597 total)

  • RE: Unable to convert character to datetime

    SELECT

    CONVERT(varchar(10), CAST(CounterDateTime AS datetime), 101) AS Date,

    RIGHT(CONVERT(varchar(20), CAST(CounterDateTime AS datetime), 100), 7) AS Time

    FROM table

  • RE: Split a variable length string without using a WHILE loop

    Jeff Moden (12/24/2013)


    ScottPletcher (12/24/2013)


    If you don't have any data longer than 24 bytes (or so), it might be easier just to "brute STUFF" it:

    Awesome! I don't believe anything will...

  • RE: Split a variable length string without using a WHILE loop

    If you don't have any data longer than 24 bytes (or so), it might be easier just to "brute STUFF" it:

    WITH SampleData (MyStr) AS

    (

    SELECT '12345678'

    ...

  • RE: SYNTAX Help please...

    Jeff Moden (12/20/2013)


    ScottPletcher (12/20/2013)


    Evil Kraig F (12/20/2013)


    ScottPletcher (12/20/2013)


    Admittedly the gain is much clearer when the clustering key is the ISNULLed column. So, let's just flip the clustering keys on...

  • RE: SYNTAX Help please...

    Evil Kraig F (12/20/2013)


    ScottPletcher (12/20/2013)


    Admittedly the gain is much clearer when the clustering key is the ISNULLed column. So, let's just flip the clustering keys on your original table...

  • RE: SYNTAX Help please...

    Evil Kraig F (12/20/2013)


    ScottPletcher (12/20/2013)


    Admittedly the gain is much clearer when the clustering key is the ISNULLed column. So, let's just flip the clustering keys on your original table...

  • RE: SYNTAX Help please...

    Evil Kraig F (12/20/2013)But, I'd like to bring us back to the origination of this minor alteration in the direction of this topic, and that's SARGability and effeciency and if...

  • RE: SYNTAX Help please...

    Evil Kraig F (12/20/2013)

    ScottPletcher (12/20/2013)


    There could be great harm in it if either (1) SQL could have done seeks on both terms and produced the final output more efficiently than...

  • RE: SYNTAX Help please...

    Jeff Moden (12/20/2013)


    ScottPletcher (12/20/2013)


    Jeff Moden (12/20/2013)


    ScottPletcher (12/19/2013)


    I don't object to ISNULL() in the SELECT list, just in WHERE conditions. Since it shouldn't be used in WHERE, it's only consistent...

  • RE: SYNTAX Help please...

    Jeff Moden (12/20/2013)


    ScottPletcher (12/19/2013)


    I don't object to ISNULL() in the SELECT list, just in WHERE conditions. Since it shouldn't be used in WHERE, it's only consistent not to use...

  • RE: How to avoid KeyLookpu in Execution Plan of a Query ?

    Snargables (12/19/2013)


    I had to create an index that added all the columns in the include of the index. This was because i created a function that has to return all...

  • RE: How to avoid KeyLookpu in Execution Plan of a Query ?

    wolfkillj (12/19/2013)


    ScottPletcher (12/19/2013)


    Jeff Moden (12/18/2013)


    ScottPletcher (12/18/2013)


    If your lookups will most often be by column2, you need to cluster the table on column2, or an encoded version of it, rather than...

  • RE: need help on design of database for student registration system

    Sigerson (12/19/2013)


    Grant Fritchey (12/18/2013)


    I could, but won't, argue that identities are a crutch. Natural keys can work fine. I try not to worry too much about the key structure while...

  • RE: How to avoid KeyLookpu in Execution Plan of a Query ?

    Jeff Moden (12/18/2013)


    ScottPletcher (12/18/2013)


    If your lookups will most often be by column2, you need to cluster the table on column2, or an encoded version of it, rather than having a...

  • RE: SYNTAX Help please...

    I don't object to ISNULL() in the SELECT list, just in WHERE conditions. Since it shouldn't be used in WHERE, it's only consistent not to use it in IF...

Viewing 15 posts - 6,256 through 6,270 (of 7,597 total)