SQL query for Odd values

SQL query for Odd values

jpokornyAXJ2L
Contributor Contributor
108 Views
1 Reply
Message 1 of 2

SQL query for Odd values

jpokornyAXJ2L
Contributor
Contributor

I am trying to query a table for only the odd values.  I do not think it likes the % command is there another way to do this?

return Table.query("SELECT Rack FROM Racks WHERE BayName % 2 <> 0 AND Sequence <= 30 ORDER BY Sequence DESC")[1][1];

0 Likes
109 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
Advocate
Advocate

You can use commands in queries. Here you can use "Math.fmod(BayName, 2)" in place of "BayName % 2".

0 Likes