Here is standard SCHOOL application demonstrating a possibility to SQL access to TPS databases. Just run school.exe, there are 2 items under “SQL” menu: “Browse Teachers with SQL filter” and “Arbitrary SQL Queries”.
First item opens Teachers browse and allows to filter like
t.LastName LIKE(‘C%’) AND m.Description IN(‘Law’, ‘Sociology’)
where t and m are aliases for Teachers and Majors tables, respectively.
Second item allows to execute any arbitrary SELECT statement against entire database, for example:
– sample sql script:
SELECT s.lastname || ’ ’ || s.firstname AS “full name”, s.Number AS number,
s.GradYear AS “grad year”, m.description AS major,
s.city AS city, s.telephone AS phone
FROM students s
JOIN majors m ON m.number=s.major
ORDER BY s.lastname
and immediately see the result set in listbox.
I hope this is interesting to someone.