Passthru SQL (from Fraktal SAS Programming): Unterschied zwischen den Versionen

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „Kategorie:zazy {{SeitenNavigation1 |links=xx_left.png |zurück=Hybrid Queries (from Fraktal SAS Programming) |rechts=xx_right.png |vorwärts=Libname Engine…“)
 
K
Zeile 20: Zeile 20:
 
|
 
|
 
  connect to oracle (user="&DB_USR." password="&DB_PWD." path="&DB_PTH.");
 
  connect to oracle (user="&DB_USR." password="&DB_PWD." path="&DB_PTH.");
| '''Open connection to the DBMS using your credentials stored in [[Macro Variables]]'''
+
| '''Open connection to the DBMS using your credentials stored in [[Symbol_Tables_(from_Fraktal_SAS_Programming)|Macro Variables]]'''
 
|-
 
|-
 
|
 
|

Version vom 30. Juni 2014, 16:32 Uhr

Zurück

Übersicht

Vorwärts

Code executed Function performed
proc sql;
Start the SQL interpreter inside SAS
connect to oracle (user="&DB_USR." password="&DB_PWD." path="&DB_PTH.");
Open connection to the DBMS using your credentials stored in Macro Variables
execute
Trigger execution of passthru code by the SAS SQL interpreter
(
Start passthru code using a bracket
create table my_ora_tab as
Type your Oracle SQL code as if you were using some Oracle client or frontend
select * 
  from ops$&DB_USR..&MYTABLE.
Inside brackets use DBMS specific SQL
)
Close passthru code using a bracket
  by oracle
Trigger execution using the DBMS connection opened before
;
Execute the query by issuing the SAS statement terminator ';'
disconnect from oracle;
Close connection to DBMS
quit;
Terminate SAS SQL interpreter status

Zurück

Übersicht

Vorwärts