| Start |
|---|
| BULK INSERT with options You can customize parsing rules using different options in WITH clause: In this example, CODEPAGE specifies that a source file in UTF-8 file, and TERMINATORS are coma and new line. |
| BULK INSERT BULK INSERT command can be used to import file into SQL Server: BULK INSERT command will map columns in files with columns in target table. |
| Reading entire content of file using OPENROWSET(BULK) You can read content of file using OPENROWSET(BULK) function and store content in some table: SINGLE_BLOB option will read entire content from a file as single cell. |
| Read file using OPENROWSET(BULK) and format file Yu can define format of the file that will be imported using FORMATFILE option: The format file, format_file.fmt, describes the columns in values.txt: |
| Read json file using OPENROWSET(BULK) You can use OPENROWSET to read content of file and pass it to some other function that will parse results. The following example shows hot to read entire content of JSON file using OPENROWSET(BULK) and then provide BulkColumn to OPENJSON function that will parse JSON and return columns: |
Read Article
https://develop.horje.com/learn/1434/reference