Forum Replies Created

Viewing 15 posts - 1 through 15 (of 202 total)

  • Reply To: Some of my greatest mistakes

    MMartin1 wrote:

    You can use something like the below to indicate a total failure somewhere. At least in the testing phase.

    DELETE
    FROM dbo.star_wars_film
    WHERE film_id IN (
    SELECT film_id
    FROM dbo.purge_test
    WHERE purge_type...
  • Reply To: Spread the Word about Basic Security

    phegedusich wrote:

    As a near-senior citizen, I’d like to know how one goes about protecting and remembering 30 or 40 different accounts/passwords. Password vaults are only as secure as the password...

  • Reply To: You're not really that good at SQL Server

    I will still continue asking stupid questions about queries until I feel fit enough, after all I’m a junior BI Developer now

    And that is the very reason Steve's approach...

  • Reply To: You're not really that good at SQL Server

    Some great points, Steve, but please don't go down the sensationalist/quasi-abusive route to spark debate.

  • RE: Some of my greatest mistakes

    Nice one David.

    These issues come up time and again: the need for an environment that support honesty, while still maintaining accountability. The need to identify and learn from...

  • RE: Some of my greatest mistakes

    Michael L John - Thursday, May 18, 2017 12:09 PM

    john.wb - Thursday, May 18, 2017 6:44 AM

  • RE: Some of my greatest mistakes

    One of my devs had exactly this problem a few weeks back. My advice was:
    * always alias tables
    * always prefix column name references with the table alias
    * it's...

  • RE: Is work just work?

    If you don't already enjoy your work, find a way to enjoy it. Whatever you're employed to do, you'll be better at your job; you, your colleagues and your employers...

  • 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,...

Viewing 15 posts - 1 through 15 (of 202 total)