May 30, 2013 #1 imox Programmer Joined May 13, 2013 Messages 37 Location DE Hello, Code: SELECT * FROM table; WHERE table.column [b]=[/b] "value" how can I set the operator '=' in a variable?
Hello, Code: SELECT * FROM table; WHERE table.column [b]=[/b] "value" how can I set the operator '=' in a variable?
May 30, 2013 #2 Olaf Doschke Programmer Joined Oct 13, 2004 Messages 14,847 Location DE You could do macro substitution: Code: lcOperator = "=" && or "<" or ">=" etc SELECT * FROM table WHERE table.column &lcOperator "value" Indeed it's not uncommon to put the whole where clause into a string variable lcWhere and then execute Code: SELECT * FROM table WHERE &lcWhere Bye, Olaf. Upvote 0 Downvote
You could do macro substitution: Code: lcOperator = "=" && or "<" or ">=" etc SELECT * FROM table WHERE table.column &lcOperator "value" Indeed it's not uncommon to put the whole where clause into a string variable lcWhere and then execute Code: SELECT * FROM table WHERE &lcWhere Bye, Olaf.
May 30, 2013 Thread starter #3 imox Programmer Joined May 13, 2013 Messages 37 Location DE It works! Thanks a lot Upvote 0 Downvote