You use SQL SELECT statements to extract  content from a database localized using Alchemy CATALYST. SELECT statements do not change data in a database, but allow you to accurately extract the relevant content that needs to be localized.

SELECT is usually the first word in an SQL statement . Most SQL statements are either SELECT or SELECT...INTO statements.

The minimum syntax for a SELECT statement is:

SELECT fields FROM table

You can use an asterisk (*) to select all fields in a table. The following example selects all of the fields in the Employees table:

SELECT * FROM Employees;

If a field name is included in more than one table in the FROM clause, precede it with the table name and the . (dot) operator. In the following example, the Department field is in both the Employees table and the Supervisors table. The SQL statement selects departments from the Employees table and supervisor names from the Supervisors table:

SELECT Employees.Department, Supervisors.SupvName

FROM Employees INNER JOIN Supervisors

WHERE Employees.Department = Supervisors.Department;

When a Recordset object is created, Alchemy database engine uses the table's field name as the Field object name in the Recordset object. If you want a different field name or a name is not implied by the expression used to generate the field, use the AS reserved word . The following example uses the title Birth to name the returned Field object in the resulting Recordset object:

SELECT BirthDate

AS Birth FROM Employees;

Whenever you use aggregate functions or queries that return ambiguous or duplicate Field object names, you must use the AS clause to provide an alternate name for the Field object. The following example uses the title HeadCount to name the returned Field object in the resulting Recordset object:

SELECT COUNT(EmployeeID)

AS HeadCount FROM Employees;

You can use the other clauses in a SELECT statement to further restrict and organize your returned data.