Applies To:
  • CitectSCADA 1.20 2.00 2.01 3.00

Summary:
Question: How do I create SQL queries for passing to MS Access (using SQLExec) without learning the SQL language? 

Solution:
MSAccess incorporates SQL functionality which can easily be generated using the graphical toolbars and Wizards, however the SQL code creates is not standard ODBC syntax. As a result, MSAccess SQL code can not be used directly in cicode.

MSQuery uses standard SQL code to perform its routine and can be used in exactly the same way as MSAccess query generation. Create the query in MS Query using it's graphical tools and wizards. Pressing the <SQL> button on the toolbar converts the query into SQL code. This can then be copied, and pasted directly into the SQLExec command in your cicode file (enclosed in quotes). Creating queries in the way ensures correct syntax and also allows you to test the query by viewing the datasheet in MS Query.

 

Keywords:
 

Attachments