The SELECT statement and BDE Aliases
The following lists syntax for various uses of the SELECT statement. It was compiled by a long standing, and obviously quite determined, dBASE developer.
SELECT used with OPEN DATABASE
and SET DATABASE
OPEN DATABASE "dBASESamples"
SET DATABASE to "dBASESamples"
SELECT * from Fish
SELECT * from Fish.dbf
SELECT * from "Fish"
SELECT * from "Fish.dbf"
and database ALIAS
OPEN DATABASE "dBASESamples"
SELECT * from :dBASESamples:Fish
SELECT * from ":dBASESamples:Fish"
SELECT * from ":dBASESamples:Fish.dbf"
SELECT used with database object and database ALIAS
d = new database("dBASESamples")
d.active = true
SELECT * from :dBASESamples:Fish
SELECT * from ":dBASESamples:Fish"
SELECT * from ":dBASESamples:Fish.dbf"
SELECT used in sql property
with database object
d = new database("dBASESamples")
d.active = true
q = new query()
q.database= d
q.sql = [SELECT * from Fish]
q.sql = [SELECT * from Fish.dbf]
q.sql = [SELECT * from "Fish"]
q.sql = [SELECT * from "Fish.dbf"]
with OPEN DATABASE and database ALIAS
OPEN DATABASE "dBASESamples"
q = new query()
q.sql = [select * from :dBASESamples:Fish]
q.sql = [select * from ":dBASESamples:Fish" F]
q.sql = [select * from ":dBASESamples:Fish.dbf" F]
SELECT used in new query()
with database object and database ALIAS
d = new database("dBASESamples")
d.active = true
q = new query([SELECT * from :dBASESamples:Fish])
q = new query([SELECT * from ":dBASESamples:Fish" F])
q = new query([SELECT * from ":dBASESamples:Fish.dbf" F])
with OPEN DATABASE and database ALIAS.
OPEN DATABASE "dBASESamples"
q = new query([SELECT * from :dBASESamples:Fish])
q = new query([SELECT * from ":dBASESamples:Fish" F])
q = new query([SELECT * from ":dBASESamples:Fish.dbf" F])