Using 1010data Macro Language in 1010SQL

The syntax of SQL expressions differs greatly from that of the 1010data Macro Language. Furthermore, the 1010data Macro Language provides a huge number of functions that simply aren't available in SQL. In order to retain the full power of the 1010data system, and in the interest of writing queries that will run optimally on the system, you can use the standard ODBC escape sequence ( {} ) to incorporate 1010data Macro Language expressions in your query.

When you are building a 1010SQL query, you can insert a 1010data Macro Language expression at within FROM, WHERE, and SELECT clauses, by placing the expression inside curly braces {}. This is the standard syntax for escape sequences in ODBC. Value expressions may use any 1010data function available in the Macro Language.

When you build 1010SQL queries, try to use as many escape sequences as possible to do the heavy lifting and calculations for your query. Not only is the Macro Language a more powerful language for transforming data and performing calculations, it is also the native language of the 1010data system. Therefore, your queries will run faster and have less chance of encountering issues when you incorporate as much Macro Language code as possible.