KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Creating a Current Selection with SQL
PRODUCT: 4D Developer | VERSION: 11 | PLATFORM: Mac & Win
Published On: February 6, 2008

The only way to create a current selection with the SQL engine is to use the QUERY BY SQL command. There is no difference between a SQL current selection of records and a 4D current selection. In other words, creating a new current selection in one language wipes out what the current selection from the other language created.

For example, to show a selection of planets whose radius is greater than 6,000 km:

QUERY BY SQL([Planets];"radius < 6000")
DISPLAY SELECTION([Planets])


Once this current selection is made, you can operate on it as you normally would using the 4D language.

See the QUERY BY SQL documentation for more information.