Answer the question
In order to leave comments, you need to log in
What happened to records after BULK INSERT?
Filled the table with data from the file:
CREATE TABLE Country (
Id INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
Name NVARCHAR(64) NOT NULL UNIQUE
);
GO
CREATE TABLE #CountriesFromFile (Name NVARCHAR(MAX));
BULK INSERT #CountriesFromFile
FROM 'E:\MS-SQL\Exam\Data\Countries.txt'
WITH (
ROWTERMINATOR = '0x0a'
);
INSERT INTO Country
SELECT *
FROM #CountriesFromFile;
DROP TABLE #CountriesFromFile;
SELECT * FROM Country;
SELECT *
FROM Country
WHERE Country.[Name] = 'Belgium ';
Answer the question
In order to leave comments, you need to log in
UPDATE Country
SET NAME = TRIM(NAME)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question