how to write conditions in cyberquery

Erik Haselhofer

New Member
This is almost certainly a pointless post, as you've either figured it out by now, or forgotten about the post. But, since Cyberquery is almost a non-topic, I don't think they even have a forum, any noncommercial support, and there probably aren't many of us out there who have used it extensively, I'll toss a bit of help out there.

An IF statement in Cyberquery is attached to a parameter as follows:

define string var = if sometable:somecol = "something" then sometable:somecol1
else sometable:somecol2

You can nest as many IF statements as you like (ELSE IF), it has the usual stuff like AND's and OR's, and you could of course tie the IF to other tables. To use the variable simply include it in the list or sum statement.

LIST
var

It's really straight-forward.
 
Top