1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Hi. I tried to replicate your issue with the WHERE clause, but didn't find a problem with SQL version 2016-03-23. Are you still stuck on this problem?
Contenus pertinents
- demandé il y a 9 mois
- demandé il y a un an
- demandé il y a 2 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Hello Greg, thanks for your reply! Yes, unfortunately I am still stuck on this. Could you please provide the SQL query you tried as well as the message you used it on?
The messages published to the topic I am querying are structured this way: { "state": { "debug": { "remoteLogging": false }, "command": "ls", ... }, "version": ... , "timestamp": ... , "metadata": ... } Should I maybe check in a different way than state.debug <> '' OR state.command <> '' whether either of these 2 properties is not empty? Thanks again!
I realize I misread your SQL statement. Now I can indeed see the behaviour. Regardless, it will be more semantic (and it will work) to use the IsUndefined() function:
WHERE IsUndefined(state.debug) = False OR IsUndefined(state.command) = False
. I hope this unblocks you.Hey Greg, thanks for you response. Indeed, isUndefined() seems to be exactly what I need! Out of curiosity, have you managed to identify why the OR operator behaves this way in my initial query?
Hi again. No I didn't. It's odd. I raised a ticket for it internally. Nonetheless, undefined is not necessarily an empty string, so the
IsUndefined
function is a better choice.