You can embed and execute
FedSQL statements from within your DS2 programs. You can use FedSQL
with DS2 in the following instances:
-
You can invoke a DS2 package method
expression as a function in a FedSQL SELECT statement.
-
You can use the SQLSTMT package
to generate, prepare, and execute FedSQL statements to update, insert,
or delete rows from a table at run time.
The SQLSTMT package
is intended for use with FedSQL statements that are executed multiple
times, statements with parameters, or statements that generate a result
set.
For more information,
see Using the SQLSTMT Package in SAS DS2 Language Reference.
-
You can also use the SQLEXEC function
to generate, prepare, and execute FedSQL statements to update, insert,
or delete rows from a table at run time.
The SQLEXEC function
is intended for use with FedSQL statements that are executed only
one time, do not have parameters, and do not produce a result set.
-
You can load data into a hash instance
at run time by using a FedSQL SELECT statement in the DECLARE PACKAGE
statement or the DATASET method.
-
You can use the SET statement to
input data by using a FedSQL SELECT statement.