03-17-2023 05:30 AM
how to implement MOD (math) functionality in Snaplogic in different
queries as well as using functions
Solved! Go to Solution.
03-23-2023 02:55 PM
@nmuppa - you mentioned queries.
Exactly what are you looking for here?
“%” is the modulus operator in JavaScript, Ruby, and Python.
If you really mean “queries,” which database system are you querying?
Microsoft SQL Server uses the % operator as well, AFAICR.
Oracle and PostgreSQL use a MOD() function.
MySQL uses a dyadic MOD operator (dividend MOD divisor).
Other DBMSes may use something entirely different, like “remainder”.
Or did you really mean you want to implement a modulus function? From scratch?
03-17-2023 07:56 AM
You can use the mod(“%”) operator.
03-23-2023 02:55 PM
@nmuppa - you mentioned queries.
Exactly what are you looking for here?
“%” is the modulus operator in JavaScript, Ruby, and Python.
If you really mean “queries,” which database system are you querying?
Microsoft SQL Server uses the % operator as well, AFAICR.
Oracle and PostgreSQL use a MOD() function.
MySQL uses a dyadic MOD operator (dividend MOD divisor).
Other DBMSes may use something entirely different, like “remainder”.
Or did you really mean you want to implement a modulus function? From scratch?