Share via

SQL server

Willie Buning 20 Reputation points
2023-05-22T09:27:26.01+00:00

I like to import a csv file with a stored procedure, works ,only!!!! After the import the data field looks like this “1234567abc” instead as 1234567abc.

if I use the flatfile import wizard then i become the data. As 1234567abc, thats good.

if i use the import wizard import data, then choose flat file, etc, then i become the data as “1234567abc”

tried to record the flatfile import wizard to see whats differend, no succses,

my question is how can make a query who give me the clean data (same as flat file import wizard)

1234567abc and not “1234567abc”. I have a stored procedure who imports the data as “1234567abc”

thanks for answering

Greetings Willie.

SQL Server | Other

Answer accepted by question author

  1. Olaf Helper 47,616 Reputation points
    2023-05-22T10:29:00.6466667+00:00

    How excatly do you import;which T-SQL command are you using?

    The double quote is often used as text qualifier and import method support to declarate the used text qualifier sign, e.g. OPENROWSET

    https://learn.microsoft.com/en-us/sql/t-sql/functions/openrowset-transact-sql?view=sql-server-ver16

    with parameter FIELDQUOTE


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.