Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

T-SQL Query Expand / Collapse
Author
Message
Posted Tuesday, April 15, 2008 5:31 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 7:14 AM
Points: 1,274, Visits: 1,983
Robert (4/15/2008)
Right, but Steve once mentioned that QoD is not about best practices. Some are about bad practice, probably to spark discussions like this, which is OK for me.

If the solution was "correct" in all respects or even mentioned that what was proposed is a bad practice, there would be no discussion.
That's true.

The danger is, however, that some people may get the newsletter, read the articles and editorials, answer the QOTD, and never look at the followup discussion as to whether the 'right' answer is actually a good answer.

I think I've mentioned before that I find the most interesting questions are often the ones with wrong or ambiguous answers, because then I often learn something new.


Derek
Post #484884
Posted Tuesday, April 15, 2008 5:51 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, September 19, 2014 8:36 AM
Points: 1,227, Visits: 894
Derek Dongray (4/15/2008)

The danger is, however, that some people may get the newsletter, read the articles and editorials, answer the QOTD, and never look at the followup discussion as to whether the 'right' answer is actually a good answer.

I think I've mentioned before that I find the most interesting questions are often the ones with wrong or ambiguous answers, because then I often learn something new.

That's life. There are always dangers. If one is so gullible to take it as good practice and not suspect a bit to at least take a look at discussion, he/she should change profession.
Such tricks are good to test trainees or employee candidates.
Post #484901
Posted Tuesday, April 15, 2008 6:12 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 4, 2014 12:21 PM
Points: 1,327, Visits: 155
kevriley (4/15/2008)
There is always 101 ways to do anything in t-sql - the trick (or more specifically, the skill) is knowing which is the right way:D

That's one of the attributes that separate a DBA from a developer!


Correct. The developer will usually get the better way done, while a DBA will usually just say it can't be done.




Mark
Post #484918
Posted Tuesday, April 15, 2008 6:38 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, May 24, 2013 5:20 AM
Points: 660, Visits: 558
Correct. The developer will usually get the better way done, while a DBA will usually just say it can't be done.


Ouch, although I think that is almost true in a lot of circumstances:

Just the other day a developer's 'solution' entailed enabling xp_cmdshell, switching authentication to mixed mode and creating a sql user in the sysadmin role just to programmatically copy log files from a SQL machine. I said that can't be done!


--------
I love deadlines. I like the whooshing sound they make as they fly by. -Douglas Adams
Post #484944
Posted Tuesday, April 15, 2008 6:44 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, September 19, 2014 8:36 AM
Points: 1,227, Visits: 894
Based on one case?
It doesn't matter dba or developer. The person matters and there are a lot of different kinds in both baskets. Also, there are many people that are both.
Post #484951
Posted Tuesday, April 15, 2008 6:46 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, September 5, 2014 1:48 PM
Points: 1,420, Visits: 2,087
Same as chandrasekhar.ms

The first thing that came in my mind was using truth table permutation
OR by NOT(AND) and thus satisfying the request.
Post #484953
Posted Tuesday, April 15, 2008 6:48 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 1:05 AM
Points: 2,842, Visits: 3,875
And just to mention that we all have made bad decisions in our past.
Some might not admit it, but thats how we function. We're not robots.



Best Regards,
Chris Büttner
Post #484955
Posted Tuesday, April 15, 2008 7:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 13,872, Visits: 9,596
Rob Goddard (4/15/2008)
Correct. The developer will usually get the better way done, while a DBA will usually just say it can't be done.


Ouch, although I think that is almost true in a lot of circumstances:

Just the other day a developer's 'solution' entailed enabling xp_cmdshell, switching authentication to mixed mode and creating a sql user in the sysadmin role just to programmatically copy log files from a SQL machine. I said that can't be done!


LOL

(My solution would be SSIS, if I had to use something SQLy for it.)


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #484989
Posted Tuesday, April 15, 2008 7:23 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 9:25 AM
Points: 25, Visits: 67
How does it satisfy a requirement if Feb can have an even or odd number of days, depending if it is a leap year? This solution is obviously not correct.
Post #484991
Posted Tuesday, April 15, 2008 7:26 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 7:14 AM
Points: 1,274, Visits: 1,983
John Portnov (4/15/2008)
How does it satisfy a requirement if Feb can have an even or odd number of days, depending if it is a leap year? This solution is obviously not correct.
The solution is counting the number of letters in the name of the month, not the days in the month!

The solution itself is correct, just not very sensible. :)


Derek
Post #484994
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse