Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 T-SQL query Rate Topic Display Mode Topic Options
Author
 Message
 Posted Monday, May 5, 2008 2:12 PM
 SSC Eights! Group: General Forum Members Last Login: Tuesday, November 29, 2016 1:00 PM Points: 991, Visits: 1,900
 Maybe that's why we keep getting these QoDs - the poster inherited a system using this awful code. ;)That being said, this is the second of these strange "out of the box" type questions. It was pretty poor last time and equally poor this time. The solution given may be technically correct, but it doesn't show better ways of doing it and breaks once you switch from English to just about any other language.I'd love to see just a little more screening for better QoDs rather than get another one of these. It's not just that it's not really challenging to figure "yes, there must be another way", but the answer is lacking. There are multiple solutions and I probably wouldn't mind if more of those were listed, but just to leave the language-specific solution in the answer alone makes it a pretty poor question/answer.
Post #495249
 Posted Tuesday, May 6, 2008 2:09 AM
 Forum Newbie Group: General Forum Members Last Login: Monday, February 23, 2009 12:42 PM Points: 3, Visits: 8
 the answer is not an multilingual answer ! i prefer to use the month number!
Post #495445
 Posted Tuesday, May 6, 2008 3:01 AM
 SSC-Enthusiastic Group: General Forum Members Last Login: Monday, November 11, 2013 2:42 AM Points: 150, Visits: 245
 Stupid question, pointless answer, 'nuff said. Throw away your pocket calculators; visit www.calcResult.com
Post #495454
 Posted Tuesday, May 6, 2008 5:56 AM
 Ten Centuries Group: General Forum Members Last Login: Monday, February 22, 2016 8:32 AM Points: 1,274, Visits: 1,992
 Although I realised that this was another silly question which was going to have an answer which was language specific, inflexible and basically stupid, my immediate thought was to use Boolean algebra. :)Since 'A OR B' can alwasy be rewritter as 'NOT (NOT A AND NOT B)' then the (still silly) solution of`where mob = 1or mob = 3or mob = 4or mob = 5or mob = 7or mob = 8`can be rewritten as`where not ( mob <> 1and mob <> 3and mob <> 4and mob <> 5and mob <> 7and mob <> 8)`Which satisfies the (poorly specified) requirement of using neither IN nor OR. :D Derek
Post #495526
 Posted Tuesday, May 6, 2008 9:11 AM
 Mr or Mrs. 500 Group: General Forum Members Last Login: Thursday, October 4, 2012 9:20 AM Points: 583, Visits: 1,060
 mike brockington (5/6/2008)Stupid question, pointless answer, 'nuff said.I totally agree - English question - English AnswerDoes it work in Swahili, Spanish, French and German? Can I spell Swahili? :D 'If you database was not adequately designed - accept your applications will be crap!' :D--Shaun Tzu's Art of DBAdmin and Design Hiding under a desk from SSIS Implemenation Work
Post #495724
 Posted Monday, May 12, 2008 1:32 PM
 SSC-Enthusiastic Group: General Forum Members Last Login: Tuesday, November 22, 2016 11:03 PM Points: 150, Visits: 662
 Select (datepart(m,getdate())-1)*(datepart(m,getdate())-3)*(datepart(m,getdate())-5)*(datepart(m,getdate())-7)*(datepart(m,getdate())-8):)
Post #499079
 Posted Tuesday, May 13, 2008 1:18 AM
 Grasshopper Group: General Forum Members Last Login: Thursday, January 14, 2016 7:16 PM Points: 10, Visits: 22
 Totally agree.This type of questions make look the problem from different angle.
Post #499357
 Posted Tuesday, May 13, 2008 1:28 PM
 Valued Member Group: General Forum Members Last Login: Thursday, March 15, 2012 9:23 AM Points: 71, Visits: 68
 "Like" no es un operador que pertenece a los "Search Arguments"
Post #499934
 Posted Wednesday, May 28, 2008 3:28 PM
 Say Hey Kid Group: General Forum Members Last Login: Wednesday, October 1, 2014 2:26 PM Points: 691, Visits: 744
 And, here I am, misinterpreting the question. I read it as using EITHER would satisfy the condition of not using BOTH!There's always an orthogonal way to read something obvious. Personally, i think that using neither ... nor... would have been more unambiguous.
Post #508050
 Posted Thursday, May 29, 2008 2:00 AM
 Mr or Mrs. 500 Group: General Forum Members Last Login: Thursday, October 4, 2012 9:20 AM Points: 583, Visits: 1,060
 steve smith (5/28/2008)And, here I am, misinterpreting the question. I read it as using EITHER would satisfy the condition of not using BOTH!There's always an orthogonal way to read something obvious. Personally, i think that using neither ... nor... would have been more unambiguous.You hit the nail on the head mate. We are all after all a rather pedantic and suposedly precise set of people - therfore abiguity needs to be eradicated with extreme predjudice, else we will interpret.(and the client will get precisely what they asked for not what they want). Hiding under a desk from SSIS Implemenation Work
Post #508235

 Permissions