Forum Replies Created

Viewing 15 posts - 586 through 600 (of 2,458 total)

  • RE: The Remote DBA

    mjh 45389 (7/19/2016)


    Sadly I have encountered one to many people who believe knowledge is power and keep things to themselves. If they do not end up leaving they often morph...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: The Remote DBA

    I have been working from home part of, or most of the time, since 2009. First as a DBA for remote clients and since 2011 as a BI Person. I...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Odd (to me) Behavior with NTILE() and NULL Values in Source Data

    Jeff Moden (7/13/2016)


    Alan.B (2/25/2016)


    The NTally Inline Table Valued Function

    N-I-I-I-I-C-E! Great documentation, too!

    Thank you, thank you! I thought you might like that ;-).

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Simple CLR request

    Solomon Rutzky (7/14/2016)


    CELKO (7/14/2016)


    Can you explain why you think this kind of programming and systems design would result in lower cost, easier maintenance or any other advantage?

    -1

    +1

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Simple CLR request

    [Quote]Jeff Moden (7/13/2016)


    Alan.B (7/13/2016)


    CELKO (7/13/2016)


    -1 is a wonderful answer. Mixed systems (those with more than one language embedded in each other) are always inefficient and a nightmare for anyone to...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Generate Repeating Set of Row_Number values

    Note that Jeff's second solution will sort the results in the order you demonstrated in your original post. The NTILE solution would not. If you need the numbers in that...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Sequential Numbers Joined to Serial Number Table

    Alternatively you can do it like this:

    WITH

    E(n) AS(

    SELECT n FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0))E(n)

    ),

    E2(n) AS(

    SELECT a.n FROM E a, E b

    ),

    E4(n) AS(

    ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Microsoft SQL Developer Certification For beginers

    Start with: Querying Microsoft SQL Server 2012/2014.

    Buy the exam book. Study it and practice the coding related to the subject matter one chapter at a time. Once you feel that...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Simple CLR request

    CELKO (7/13/2016)


    -1 is a wonderful answer. Mixed systems (those with more than one language embedded in each other) are always inefficient and a nightmare for anyone to read or maintain....

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Simple CLR request

    CELKO (7/12/2016)


    -1 is a wonderful answer.

    To what? Who are you trying to communicate with here?

    Mixed systems (those with more than one language embedded in each other) are always in...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Simple CLR request

    Solomon Rutzky (7/9/2016)


    Alan.B (7/7/2016)


    Ok Solomon, I tried to figure this out and failed. Forgive my CLR noobness (I create about 1 CLR/year) and I'm sure this is simple but I'm...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Today's Random Word!

    Ed Wagner (7/12/2016)


    djj (7/12/2016)


    whereisSQL? (7/12/2016)


    Ed Wagner (7/12/2016)


    Manic Star (7/12/2016)


    TomThomson (7/12/2016)


    djj (7/12/2016)


    whereisSQL? (7/12/2016)


    Ray K (7/12/2016)


    jasona.work (7/12/2016)


    crookj (7/12/2016)


    Grumpy DBA (7/12/2016)


    Alan.B (7/12/2016)


    attack

    Defend

    Rope-a-Dope

    The Greatest

    Ali

    Clay

    Feet

    Inches

    25.4 Millimeters

    Distance

    Travelled

    Vacation

    Relaxation

    Taxation

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: EXEC and EXECUTE

    Easy one (but I still ran this in SSMS to be safe 😛 : EXECUTE('SELECT 1');)

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Sequence generation

    I'm pretty confident that what I posted would do the trick provided the OP has or can add a datetime column.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Combine rows into one row with line break by querying with XML

    shogunSQL (7/12/2016)


    Hi,

    I have a table like this:

    Create table Tbl_Test01

    (

    Name nvarchar(20),

    Item nvarchar(30)

    )

    ;

    insert into Tbl_Test01

    values

    ('Car','Honda2016'),

    ('Car','Honda2017'),

    ('Car','Honda2018'),

    ('Tool','Dwwalt2016'),

    ('Tool','Dwwalt2017'),

    ('Tool','Dwwalt2018'),

    ('Tool','Dwwalt2019')

    select *

    from Tbl_Test01

    I'd like to have the value of the column Name show up once and the...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 586 through 600 (of 2,458 total)