Hybrid Queries (from Fraktal SAS Programming): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K |
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:31 Uhr
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 |
create table my_sas_tab as |
Initiate creating your SAS table using ANSI SQL code |
select * from connection to oracle |
Start your query from inside SAS with a special from clause |
( select * from ops$&DB_USR..&MYTABLE. ) |
Inside brackets use DBMS specific SQL |
; |
Execute the query by issuing the SAS statement terminator ';' |
disconnect from oracle; |
Close connection to DBMS |
quit; |
Terminate SAS SQL interpreter status |