Hi @INNINNII,
*.csv/txt flat files always have host of problems where column delimiters, column separators, invisible characters like null terminators \0, special characters based on encoding, and line breaks are in the middle of the actual data. Or data elements are missing completely.
The most reliable format for data feeds is XML enforced by an XSD. An XSD plays a role of a data contract between sender and receiver. It will guarantee proper data format/shape, data types, cardinality, and enforce data quality.
For your immediate need you can try to use QUOTENAME()
function.
It will enclose columns in question with double quotes.
-- DDL and sample data population, start
DECLARE @tbl TABLE (id INT IDENTITY PRIMARY KEY, Product VARCHAR(256), case_date DATE);
INSERT @tbl (Product, case_date) VALUES
('Bolt EV, 278 miles', '2022-10-27'),
('Tesla Model 2, 300 miles', '2024-05-27');
-- DDL and sample data population, end
-- or CONCAT() for strings longer than 256 chars
SELECT ID, Product = QUOTENAME(Product, CHAR(34)), case_date
FROM @tbl;