Forum Replies Created

Viewing 15 posts - 2,386 through 2,400 (of 19,560 total)

  • RE: Split cell with comma separated values without a function

    texpic (8/4/2014)


    I'm getting an error, incorrect syntax near 1 (the 3:07 solution)

    What version of SQL Server are you on?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Split cell with comma separated values without a function

    One more version. A little more dynamic. Also returns the results in the same order you listed.

    CREATE TABLE #Test

    (MyName varchar(10), MyCommaData varchar(50));

    INSERT INTO #Test

    SELECT 'Tom', '10,20,30,40' UNION ALL

    SELECT...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Split cell with comma separated values without a function

    Try this one. It is more of a kluge especially if there are a bunch of values in the delimited list.

    CREATE TABLE #Test

    (MyName varchar(10), MyCommaData varchar(50));

    INSERT INTO #Test

    SELECT 'Tom',...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Split cell with comma separated values without a function

    I am with Lynn on this. Why must it be done without a function?

    It can be done without a function but takes a bit more code. The use...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Are the posted questions getting worse?

    Lynn Pettis (8/4/2014)


    Don't you just love people that ask for help but tell you it can't be a certain way, especially when the way the say it can't be done...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Are the posted questions getting worse?

    djj (8/4/2014)


    Found this from Paul S. Randal of SQLskills.com:

    "Here's the rule: if my 14-yr old smart daughter could find the answer on Google from your question, you'd shouldn't ask or...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: A DBA at the Opera

    Andrew Kernodle (8/4/2014)


    ... You know, now that I think about it... 😛

    But eh, frustrating though it may be, I'll just have to get some climbing gear out and...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: A DBA at the Opera

    Andrew Kernodle (8/4/2014)


    Oh geez. I feel quite operatic in the sense of this article lately 😛

    The sysadmin here decided a few weeks back that the CPU usage of the...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Lock a SQL login account

    irvidesai (8/4/2014)


    Thanks for the reply. So the alter login has to be done manually on that accounts that are not in compliance correct? can that be automated? Is there a...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: A DBA at the Opera

    Gary Varga (8/4/2014)


    What is the old saying? "A stitch in time saves nine!!!"

    There is no reason for computing to be any different to anything else. I cannot remember the number...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Search or data mining in SQL server

    anthony.green (8/4/2014)


    Then you need to order the results and select the top X amount

    SELECT

    *

    FROM

    Property

    WHERE

    Beds = 2

    AND

    Location = 'XYZ'

    ORDER BY

    Baths DESC, -- more baths the better

    Price ASC, -- less price the...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Is a foreign key constraint an index? If not, is an index automatically created in order to enforce it?

    Phil Factor (8/4/2014)


    I'm sorry if it got scored too high, but when I ask this as part of a technical interview, it seems to stump a very large proportion of...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Is a foreign key constraint an index? If not, is an index automatically created in order to enforce it?

    Gazareth (8/4/2014)


    I just thought the easy Q & high points was an attempt to improve everyone's Monday morning 🙂

    Can we do this every week?!

    +1

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Creating Index take a long time

    Tune the insert, get the insert to finish.

    Wait until an outage window when nobody will be connecting to the database and do your index then

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • RE: Creating Index take a long time

    Ok, that tells a tale of a much smaller table than what you were showing before.

    I bet there was blocking, or memory thrashing, or slow io, or any number of...

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 15 posts - 2,386 through 2,400 (of 19,560 total)