/
Reading from a Database
Reading from a Database
In the Translator, you can read data from a database by either calling stored procedures or using conn:query{}
to execute ad hoc SQL SELECT statements on a database. See Writing SQL Statements.
local R = conn:query{sql='SELECT * FROM Patients WHERE LastName=' ..conn:quote(lastName)}
The conn:query{}
method prevents the accidental use of SQL statements that might modify the database from the Translator, which automatically executes when you make script changes or sample data changes.
, multiple selections available,
Related content
Executing SQL Statements
Executing SQL Statements
More like this
Dynamic SQL Query Construction
Dynamic SQL Query Construction
More like this
Calling Stored Procedures
Calling Stored Procedures
More like this
Handling Special Characters in SQL Statements
Handling Special Characters in SQL Statements
More like this
Writing to a Database
Writing to a Database
Read with this
Annotation Windows
Annotation Windows
More like this