Hi, I need help on simplyfying this Update query!

By Paul Vallee March 19th, 2008 at 9:50 am
Posted in Not on HomepageSQL Server
Tags:

I would not wish this task on my worst enemy. My friend, good luck and best wishes but I’m afraid I just can’t help you, because that much suffering is way too much for me.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Google
  • del.icio.us
  • Facebook
  • bodytext
  • Technorati
  • TwitThis
  • Reddit

4 Responses to “Hi, I need help on simplyfying this Update query!”

  1. Shakir Sadikali Says:

    Haha, i was about to send this off to Rob Hamel. If he can’t do it, no one can! :-)

  2. John Flack Says:

    I wish that instead of giving a query that doesn’t work, people would show their data structure and explain what they need to retrieve from it. In plain language. You need to understand the problem you are trying to solve, not the failed attempts to solve it.

  3. Paul Vallee Says:

    John, I’m totally with you, but tell me the truth - if you took a new job or appeared at a client site and this was the task they assigned you - tell me you wouldn’t desperately clutch at straws and scratch at the coffin in hopes of getting someone else to do that for you.

  4. PaulM Says:

    If this is SQL 2005 use Common Table Expressions (CTE) if it is Oracle 10 use WITH …
    (which is along the same lines) and if you want, throw it through the advisors in both and see what they say.

    I agree with John and Paul, knowing what it is trying to retrieve is normally the first step to getting a handle on the SQL.

    I am worried Paul has just found a new interview question for getting a job with Pythian…
    Simplify this SQL. You have 1 hour ;)

Leave a Reply

Filling out the following captcha not only allows us to cut down on automated blogspam but also helps digitize books. Please feel free to send comments on this approach directly to Paul at vallee@pythian.com.

NOTE: After submitting your comment, verify that it is added to the blog. New comments will be marked as "waiting for moderation" (we only moderate for spam). If the level of spam is as low as we hope, we will bypass this step.