Dynamically Executing FedSQL Statements from DS2
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 use the SET statement to
read in data by using a FedSQL SELECT statement.
Copyright © SAS Institute Inc. All Rights Reserved.
Last updated: February 23, 2017