Forum Replies Created

Viewing 15 posts - 16 through 30 (of 209 total)

  • RE: This is how to fail

    Yup. If only politicians could adopt the same approach.

  • RE: SQL Code QA

    MMartin1 (9/15/2016)


    We don't use AS in the table aliases, though, because that's usually pretty clear.

    I find it clearer if AS is used consistently when aliasing anywhere. If I can...

  • RE: SQL Code QA

    Please note I'm looking at the layout, not the detail. Here's a suggestion:

    USE TESTDB

    GO

    DECLARE @checkDate DATE = DATEADD(day, DATEDIFF(day, 1, GETDATE()), 0);

    SELECT[Work Type]= d.WORK_TYPE,

    [Date Opened]= CONVERT(varchar, a.ACT_DATE, 103),

    [Time Opened]=...

  • RE: SQL Code QA

    Sue_H (9/14/2016)

    In the old school habits for the database world, there would be no ON clause used at all. It was a matter of trying to figure out the joins...

  • RE: SQL Code QA

    drew.allen (9/8/2016)


    Also, my approach can easily be used with derived tables, again being consistent. You're approach could quickly become cumbersome with derived tables.

    Drew

    How?

  • RE: SQL Code QA

    Phil Parkin (9/8/2016)


    In my opinion, Drew's approach is more consistent than putting short ON clauses on one line and longer ON clauses on two (because 'longer' is a qualitative measure,...

  • RE: SQL Code QA

    Phil Parkin (9/8/2016)


    I disagree. It makes perfect sense. He *always puts ON clauses on separate indented lines* – perfectly consistent.

    That's the point I'm making - it's consistent, but no more...

  • RE: SQL Code QA

    drew.allen (9/7/2016)


    I always put my ON clauses on a separate indented line, because I want to keep it consistent. I treat short and long JOIN clauses the same, if...

  • RE: autosave (not autorecover)

    Brilliant - that's the one, thanks 🙂

  • RE: Lessons from Little Green Army Men

    djackson 22568 (2/19/2016)


    ... Our society has a huge issue with thinking that we have a right to not be offended. The way to handle that is the delete button.

    OMG,...

  • RE: Lessons from Little Green Army Men

    I don't think we'll get very far by trying to demonstrate things "how they should be", particularly if we could be following accepted behaviour ourselves.

    Rather, I feel it's better...

  • RE: Lessons from Little Green Army Men

    richlion2 (2/19/2016)


    Yet another blog type article, why do people feel compelled to tell every possible story they have to tell? No toy women soldiers? So what? It's one of those...

  • RE: Lessons from Little Green Army Men

    Just do what you're doing Andy, you're doing a great job.

  • RE: Positive or Negative

    Eric M Russell (10/23/2015)


    To determine active / inactive status, I'm not looking for a specific value; it's

    contextual based on a range comparison.

    -- return all currently active customers:

    select * from...

  • RE: Positive or Negative

    angel-626714 (10/23/2015)


    david.wright-948385 (10/23/2015)


    You have two indicators for the same thing: the flag, and whether the date is null. So it's possible to have a non-null cancellation date with a flag...

Viewing 15 posts - 16 through 30 (of 209 total)