Q
Problem solve Get help with specific problems with your technologies, process and projects.

Wrong answer for MOD function?

SQL and PL/SQL--When we use mod function if salary is less than comm then the remainder becomes actual salary. Why is this answer wrong?


Not sure I understand why it's wrong.

Mod(37,9) = 1
Mod(9,37) = 9

Sorry, I have not myself tried the Oracle MOD function, but if it implements the modulus operation correctly, then yes, Mod(Salary,Comm) will be equal to Salary whenever Salary is less than Comm.

You might need a CASE structure in your SQL...

For More Information


This was last published in May 2001

Dig Deeper on Oracle and SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close