You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/t-sql/functions/openrowset-transact-sql.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -394,8 +394,8 @@ FROM Northwind.dbo.Customers AS c
394
394
The following example creates a small table for demonstration purposes, and inserts file data from a file named `Text1.txt` located in the `C:` root directory into a `varbinary(max)` column.
395
395
396
396
```sql
397
-
CREATETABLEmyTable(FileName nvarchar(60),
398
-
FileType nvarchar(60), Document varbinary(max));
397
+
CREATETABLEmyTable(FileName NVARCHAR(60),
398
+
FileType NVARCHAR(60), Document VARBINARY(max));
399
399
GO
400
400
401
401
INSERT INTO myTable(FileName, FileType, Document)
@@ -414,15 +414,15 @@ GO
414
414
415
415
The following example uses a format file to retrieve rows from a tab-delimited text file, `values.txt` that contains the following data:
416
416
417
-
```sql
417
+
```
418
418
1 Data Item 1
419
419
2 Data Item 2
420
420
3 Data Item 3
421
421
```
422
422
423
423
The format file, `values.fmt`, describes the columns in `values.txt`:
424
424
425
-
```sql
425
+
```
426
426
9.0
427
427
2
428
428
1 SQLCHAR 0 10 "\t" 1 ID SQL_Latin1_General_Cp437_BIN
@@ -473,8 +473,8 @@ SELECT * FROM OPENROWSET(
473
473
```
474
474
475
475
```sql
476
-
select*
477
-
from openrowset
476
+
SELECT*
477
+
FROM OPENROWSET
478
478
( 'MSDASQL'
479
479
,'Driver={Microsoft Access Text Driver (*.txt, *.csv)}'
0 commit comments