Contents

 
Home
ASPRunner Professional 7.0 manual
Prev Page Next Page
 
 

SQL tab

 

On the SQL tab you can modify SQL query manually. All changes on this tab automatically transfer to the Query Designer.

yellowbulbNote: if you modify default SQL query, make sure that key column(s) are included into fields list. This is required to provide edit/delete/view functionality. If table participates in Master-Details relationship make sure link fields (primary/foreign key) stay on the list of fields.

qd_sql

To switch between tables use Tables list panel on the left.

What is supported

Inner joins, outer joins

SQL query:

SELECT

carsmodels.id,

carsmodels.model,

carsmodels.make

FROM carsmodels

INNER JOIN carsmake ON carsmodels.make = carsmake.make

For more information on using JOIN SQL queries, see Using JOIN SQL queries.

yellowbulbNote: It's recommended to use aliases for fields from joined tables to avoid confusion when two from different tables have the same name.

Calculated fields

SQL query:

SELECT

Make,

Model,

YearOfMake,

Picture,

Price,

color,

zipcode,

features,

Price*0.1 AS Discount

FROM carscars

WHERE clause

SQL query:

SELECT *

FROM carscars

WHERE YearOfMake =2004

For more complicated queries wrap the condition by parentheses:

SELECT *

FROM carscars

WHERE ( YearOfMake =2004 OR YearOfMake =2005 )

What is not supported

· Stored procedure calls (Workaround: create a view that calls stored procedure and use this view as a datasource)
· Update/Delete/Insert/Create queries
· Unions
· DISTINCT keyword

yellowbulbNote: If your query for some reason doesn't work create view/query in your database and use this query as a datasource in ASPRunnerPro.

1. Run MS Access and create new query. Switch to SQL view.
2. Type your SQL query there.
3. Save this query as qryNewQuery.
4. Run ASPRunnerPro and use qryNewQuery as datasource table.
Converted from CHM to HTML with chm2web Standard 2.85 (unicode)