Forum Replies Created

Viewing 15 posts - 256 through 270 (of 683 total)

  • RE: Beginning Database Design - Spot the Flaws

    cs_troyk (11/21/2007)


    jomobono (11/20/2007)


    Couldn't disagree more.

    tgarth (11/21/2007)


    I totally agree with jomobono.

    I have to laugh! :hehe:

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Beginning Database Design - Spot the Flaws

    Theon Kimball (11/20/2007)


    Wouldn't it be great to have a reference table holding a list of owners

    And that then leads to the question of borrowing a book from a guy who...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Beginning Database Design - Spot the Flaws

    Andrew_Webster (11/20/2007)


    "book" v "books"... hmmm.

    Anyone else's take on this...?

    As if we don't have enough to discuss in this thread! 😀

    I go with Books, BookReviews and BookAuthors.

    This is a style issue...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Beginning Database Design - Spot the Flaws

    Obs (11/20/2007)


    My opinion says that yeah, this was a meant to be spot the flaw in the design (hence the title). Understandably, you could say flaw #1 are the...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Beginning Database Design - Spot the Flaws

    Obs (11/20/2007)


    harald_m_mueller, I think your missing the spirit of what Steve is trying to put out. Yes, there could be a better description of what requirements are, but as...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Beginning Database Design - Spot the Flaws

    This (and some of your others) is a great comment, Harald.

    You have written exactly what I was thinking and often think in these situations. Very nicely done! 🙂

    harald_m_mueller (11/20/2007)


    Sorry if...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Extract values from a string using a delimiter

    Just for fun :D, here's the same sort of thing using the recursive CTE technique...

    [font="Courier New"]DECLARE @String VARCHAR(255)

    DECLARE @Delimiter CHAR(1)

    DECLARE @Occurrence INT

    DECLARE @Num_Fields INT

    SET @String = 'A,B,C,D,E'

    SET @Delimiter = ','

    SET...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Advanced XML Processing

    Nice work Jacob.

    Here's a 3rd way, this time using XML PATH...

    SELECT

    OrderHeader.Name AS 'OrderHeader/Name',

    OrderHeader.Address AS 'OrderHeader/Address',

    OrderHeader.Code AS 'OrderHeader/Code',

    ...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Conditional Statements in WHERE Clauses

    Steve Coleman (9/28/2007)


    Sorry but I couldn't see the whole example. The scroll bars on the example did not work.

    Steve

    Steve,

    It looks like this...

    -- Declare some local variables. Actually, we are creating...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Conditional Statements in WHERE Clauses

    Ben (9/28/2007)


    Exacxtly, though if you throw an 'or @companyName is null' in there the optimiser will ignore any 'parameters' that are not set.

    Yes, I know about that (it's in...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: Conditional Statements in WHERE Clauses

    I'm with Adam, check out MVP Erland Sommarskog's article on this: http://www.sommarskog.se/dyn-search.html

    However, for the example presented by the article, can someone tell me what's wrong with simply this?...

    select

    ...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: SQL Challenge!

    Hi Peso - wrong site for the yak reference isn't it?

    I just realised, we can use this little trick...

    SELECT

    ColA

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: SQL Challenge!

    Hmmm - I'm surprised!  I reckon you should use Jason's since what I gave won't give you what I think you want for some...

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • RE: SQL Challenge!

    Hi Sho,

    This works against your sample data, but I've a feeling you're going to post more data where this doesn't give what you're looking for!

  • RE: Getting Random Results

    And here's the results data (for 100 separate tests)...

    /*

    Summary

    Method1     Method2     Method3     Method4

    ----------- ----------- ----------- -----------

    2539        1976        1057        2476

     

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

  • Viewing 15 posts - 256 through 270 (of 683 total)