How to Copy/Paste following delimited data (by default delimited with tab) from excel:
declare @t_values nvarchar(max) =
N\'
If by some reason you don't want to use PROC (no permissions for instance), you can use snippet instead.
Please save this code as file with extension .snippet
and add it to your snippets through Code Snippets Manager
:
InsertTable
Prepare Copy/Paste Excel data for inserting to Table
Denis Sipchenko
SurroundsWith
t_name '#insertTable' Destination Table Name [(column names)]
t_values copy/paste Excel data here
delimiter char(9) Column Delimiter: HT = char(9) = HorizontalTab
0 -- skip empty rows
$selected$$end$
]]>
Screen: