Passthru SQL (from Fraktal SAS Programming): Unterschied zwischen den Versionen
		
		
		
		Zur Navigation springen
		Zur Suche springen
		
| KKeine Bearbeitungszusammenfassung | KKeine Bearbeitungszusammenfassung | ||
| Zeile 19: | Zeile 19: | ||
| |- | |- | ||
| | | | | ||
|   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 [[Symbol_Tables_(from_Fraktal_SAS_Programming)|Macro Variables]]''' | | '''Open connection to the DBMS using your credentials stored in [[Symbol_Tables_(from_Fraktal_SAS_Programming)|Macro Variables]]''' | ||
| |- | |- | ||
| Zeile 28: | Zeile 32: | ||
| | | | | ||
|   ( |   ( | ||
|   create table my_ora_tab as |   create table my_ora_tab as | ||
|   select *   |   select *   | ||
|     from ops$&DB_USR..&MYTABLE. |     from ops$&DB_USR..&MYTABLE. | ||
|   ) |   ) | ||
| | ''' | | '''Inside brackets type your DBMS SQL code as if you were using some DBMS client or frontend''' | ||
| |- | |- | ||
| | | | | ||
| Zeile 46: | Zeile 44: | ||
| | | | | ||
|   ; |   ; | ||
| | ''' | | '''''Pass the code through to DBMS'' by issuing the SAS statement terminator ';'''' | ||
| |- | |- | ||
| | | | | ||
Version vom 2. Juli 2014, 08:12 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 | 
| execute | Start coding a passthru SQL code segment | 
| ( create table my_ora_tab as select * from ops$&DB_USR..&MYTABLE. ) | Inside brackets type your DBMS SQL code as if you were using some DBMS client or frontend | 
| by oracle | Trigger execution using the DBMS connection opened before | 
| ; | Pass the code through to DBMS by issuing the SAS statement terminator ';' | 
| disconnect from oracle; | Close connection to DBMS | 
| quit; | Terminate SAS SQL interpreter status | 


