I\'m trying to insert a CSV into a Temporary table and this SQL statement doesn\'t seem to work.
DECLARE @TempTable TABLE (FName nvarchar(max),SName nvarchar
you can not use bulk insert for table variable. for that you have create temp table like below.
CREATE TABLE #TEMPtbl
(
[FNAME] [nvarchar](MAX) ,
[SNAME] [nvarchar](MAX) ,
[EMAIL] [nvarchar](MAX)
)
GO
BULK INSERT #TEMPtbl FROM 'C:\FileName.csv'
WITH (FIRSTROW = 1, FIELDTERMINATOR = ',', ROWTERMINATOR = '\n')
you can try This one. it may be help you.