CREATE TABLE #Applicants (
[AppID] [smallint] NOT NULL,
[FName] [nvarchar](20) COLLATE Latin1_General_CS_AS NOT NULL,
[LName] [nvarchar](40) COLLATE Latin1_General_CS_AS NOT NULL,
[Resume] varchar(max) NULL
)
;
BULK INSERT #Applicants
FROM 'c:\test.txt'
WITH (FIELDTERMINATOR = ',',ROWTERMINATOR = '\n')
;
insert [dbo].[Applicants]
select AppID, FName, LName, SUBSTRING(LTrim(Resume), 2, LEN(LTrim(Resume))-2)
from #Applicants
|