|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Export a dataset to SQL insert statements. More...
Go to the source code of this file.
Converts dataset values to SQL insert statements for use across multiple database types.
Usage:
%mp_ds2inserts(sashelp.class,outref=myref,outds=class) data class; set sashelp.class; stop; proc sql; %inc myref;
| [in] | ds | The dataset to be exported |
| [in] | maxobs= | (max) The max number of inserts to create |
| [out] | outref= | (0) The output fileref. If it does not exist, it is created. If it does exist, new records are APPENDED. |
| [out] | schema= | (0) The library (or schema) in which the target table is located. If not provided, is ignored. |
| [out] | outds= | (0) The output table to load. If not provided, will default to the table in the &ds parameter. |
| [in] | flavour= | (SAS) The SQL flavour to be applied to the output. Valid options:
|
| [in] | applydttm= | (YES) If YES, any columns using datetime formats will be converted to native DB datetime literals |
Definition in file mp_ds2inserts.sas.