Log in  ::  Register  ::  Not logged in

 Author Message SanDroid SSCrazy Group: General Forum Members Points: 2448 Visits: 1046 mtassin (2/28/2011)I got this right but...SELECT 0%0givesMsg 8134, Level 16, State 1, Line 1Divide by zero error encountered.So it seems you can use it to divide 0 by 0 and get an error.Seriously? :-P mtillman-921105 SSCommitted Group: General Forum Members Points: 1532 Visits: 3852 sknox (2/28/2011)mtassin (2/28/2011)I got this right but...SELECT 0%0givesMsg 8134, Level 16, State 1, Line 1Divide by zero error encountered.So it seems you can use it to divide 0 by 0 and get an error.:-)This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.p.s. To be more clear, it looks like a small zero divided by zero: 0/0. ______________________________________________________________________The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking BarbW Hall of Fame Group: General Forum Members Points: 3349 Visits: 1130 I feel so silly for selecting the wrong answer - which was so obviously wrong..I am humbled. Thank goodness it's Monday so I can blame something :-D mtassin SSCertifiable Group: General Forum Members Points: 7336 Visits: 72521 mtillman-921105 (2/28/2011)Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.p.s. To be more clear, it looks like a small zero divided by zero: 0/0.Gotta be careful with jokes... as I said, I got this one right.But somebody else could have said "Hey if I modulus 0 by 0 I get a divide by zero error!" and selected the last option, not realizing you were referring to what the % sign looks like. --Mark Tassin MCITP - SQL Server DBAProud member of the Anti-RBAR alliance.For help with Performance click this linkFor tips on how to post your problems SanDroid SSCrazy Group: General Forum Members Points: 2448 Visits: 1046 mtassin (2/28/2011)[quote]But somebody else could have said "Hey if I modulus 0 by 0 I get a divide by zero error!" and selected the last option, not realizing you were referring to what the % sign looks like.Which would mean nothing unless they could find documentation supporting the obvious wrong answer. It was a multiple choice question with one right answer. Test taking 101 tells us to select the answer that is MOST correct.That was answer 3.I like it when there are joke answers that are funny IF you understand the questions, or what you are reading. It has been proven that these questions improve learning. SQLRNNR SSC Guru Group: General Forum Members Points: 67577 Visits: 18570 thanks for the question - straight forward. Jason AKA CirqueDeSQLeilI have given a name to my pain...MCM SQL Server, MVPSQL RNNRPosting Performance Based Questions - Gail Shaw UMG Developer SSCarpal Tunnel Group: General Forum Members Points: 4088 Visits: 2204 Thanks for the nice easy start to the week! Toreador Hall of Fame Group: General Forum Members Points: 3851 Visits: 8126 SanDroid (2/28/2011)So happy that over 80 percent of us know math.Can you imagine how hard it would be a SQL developer or DBA if you didn't learn higher level math?What's maths got to do with it? The use of % for modulo is a computing term. The mathemetical equivalent would be 'mod', though it's meaning is similar rather than identical.eg 8 % 6 = 2means roughly the same as 8 = 2 (mod 6)or more accurately8 ≡ 2 (mod 6)(note it's 25 years since I graduated so I'm probably about to be humilated when someone points out that I'm talking nonsense :-)) SQL-DBA-01 SSCrazy Eights Group: General Forum Members Points: 8451 Visits: 3581 Ambiguity in the question..!Answer should be both..(1) divide by zero/ (2) remainder. Thanks. mtillman-921105 SSCommitted Group: General Forum Members Points: 1532 Visits: 3852 OK, the next time I submit a question, I'll be sure that the fluke answer, if there is one included, can in no way be misconstrued as a possible right answer.I think some of you are used to trick questions, so you're looking for a sneaky answer. ______________________________________________________________________The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge. - Stephen Hawking

## Permissions

 You can't post new topics. You can't post topic replies. You can't post new polls. You can't post replies to polls. You can't edit your own topics. You can't delete your own topics. You can't edit other topics. You can't delete other topics. You can't edit your own posts. You can't edit other posts. You can't delete your own posts. You can't delete other posts. You can't post events. You can't edit your own events. You can't edit other events. You can't delete your own events. You can't delete other events. You can't send private messages. You can't send emails. You can read topics. You can't vote in polls. You can't upload attachments. You can download attachments. You can't post HTML code. You can't edit HTML code. You can't post IFCode. You can't post JavaScript. You can post emoticons. You can't post or upload images.

##### Select a forum
 SQL Server 2016      SQL Server 2016 - Administration      SQL Server 2016 - Development and T-SQL SQL Server 2014      Administration - SQL Server 2014      Development - SQL Server 2014 SQL Server 2012      SQL 2012 - General      SQL Server 2012 - T-SQL SQL Server vNext      SQL Server 14 - Administration      SQL Server 14 - Development SQL Server 2008      SQL Server 2008 - General      T-SQL (SS2K8)      June 2007 CTP      Working with Oracle      July CTP      SQL Server Newbies      Security (SS2K8)      SQL Server 2008 High Availability      SQL Server 2008 Administration      Data Corruption (SS2K8 / SS2K8 R2)      SQL Server 2008 Performance Tuning Cloud Computing      SQL Azure - Development      SQL Azure - Administration      Amazon AWS and other cloud vendors      General Cloud Computing Questions Reporting Services      Reporting Services      Reporting Services 2005 Administration      Reporting Services 2005 Development      Reporting Services 2008/R2 Administration      Reporting Services 2008 Development      SSRS 2012      SSRS 2014      SSRS 2016 Programming      Connecting      General      SMO/RMO/DMO      XML      Service Broker      Powershell      Testing      TFS/Data Dude/DBPro      SSDT      Continuous Integration, Deployment, and Delivery      R Services and R Language Data Warehousing      Integration Services      Strategies and Ideas      Analysis Services      Data Transformation Services (DTS)      Performance Point      Data Mining      PowerPivot      R language      Machine Learning Database Design      Disaster Recovery      Design Ideas and Questions      Relational Theory      Hardware      Virtualization SQLServerCentral.com      Anything that is NOT about SQL!      Contests!      Editorials      SQLServerCentral.com Announcements      SQLServerCentral.com Website Issues      Suggestions      Tag Issues with Content      Podcast Feedback      SQLServerCentral.com Test Forum      Articles Requested SQL Server 2005      Administering      Backups      Business Intelligence      CLR Integration and Programming.      Data Corruption      Development      Working with Oracle      SQL Server 2005 Compact Edition      SQL Server 2005 General Discussion      SQL Server 2005 Security      SQL Server 2005 Strategies      SS2K5 Replication      SQL Server Express      SQL Server 2005 Performance Tuning      SQL Server 2005 Integration Services      T-SQL (SS2K5)      SQL Server Newbies SQL Server 7,2000      Administration      Backups      Data Corruption      General      Globalization      In The Enterprise      Working with Oracle      Security      Strategies      SQL Server Newbies      Service Packs      SQL Server CE      Performance Tuning      Replication      Sarbanes-Oxley      T-SQL      SQL Server Agent SQL Server and other platforms      MySQL      Oracle      PostgreSQL      DB2      SQL Server and Sharepoint Older Versions of SQL (v6.5, v6.0, v4.2)      Older Versions of SQL (v6.5, v6.0, v4.2) Career      Certification      Employers and Employees      Events      Job Postings      Resumes and Job Hunters      Presentations and Speaking      Retired Members Testing Center      Question of the Day (QOD)      SQL Server Security Skills Microsoft Access      Microsoft Access Products and Books      Third Party Products         CA         Extreme Technologies.         Innovartis         Embarcadero         SQL Sentry         Sonasoft         SQLCentric         Golden Gate Software         Lumigent         Red Gate Software         Quest Software         ApexSQL         Idera      Discussions about Books         Discuss Programming Books          Discuss XML Books          Discuss T-SQL Books          Discuss Data Warehousing Books          Discuss DTS Books          Discuss SQL Server 7.0 Books         Discuss SQL Server 2000 Books Notification Services      Administration Article Discussions Future Versions      SQL 12