Thursday, February 28, 2013

How to query multiple values in a form

I started supporting an Oracle EBS application with virtually no experience with an Oracle application prior to that, so from time to time I'll find something which may be very simple but incredibly useful if you didn't know it.  This post follows that vein.  A little while ago I learned that in Oracle 11i Forms instead of using % wildcards to substitute for values in your searches, you can also find a list of values by placing #IN within the field, followed by (value1,value2) which will look familiar if you have practice writing a SQL statement putting it together like:

#IN(value1, value2, value3)

Then you can run your query via the menu or Ctrl-F11, and you'll actually find records which contain values 1 through 3 which is pretty cool but also really handy if you have several flags which need to be searched for in an application form so that you can add some complexity to what used to be simple queries in the forms with just %s.

No comments:

Post a Comment