zoranjagodina
Programmer
- Jul 27, 2010
- 3
I have source file A.TXT
----------------------------------------------------
100140720102223470000103
200XXXX 000015000000010007000
200YY 000019000000010001600
200Z 000007000000010011200
3000000004100000
when do T-SQL
-- Create a table to hold the data
CREATE TABLE #textfile (line varchar(8000))
-- Read the text file into the temp table
BULK INSERT #textfile FROM 'c:\A.TXT'
GO
-- Now read it
SELECT * FROM #textfile
-- And then clean up
DROP TABLE #textfile
GO
I got target
-------------------------------
100140720102223470000103
200XXXX 000015000000010007000
200YY 000019000000010001600
200Z 000007000000010011200
3000000004100000
Why T-SQL kill blanks ?
( This editor kill blanks in my original post)
My original pos is on
----------------------------------------------------
100140720102223470000103
200XXXX 000015000000010007000
200YY 000019000000010001600
200Z 000007000000010011200
3000000004100000
when do T-SQL
-- Create a table to hold the data
CREATE TABLE #textfile (line varchar(8000))
-- Read the text file into the temp table
BULK INSERT #textfile FROM 'c:\A.TXT'
GO
-- Now read it
SELECT * FROM #textfile
-- And then clean up
DROP TABLE #textfile
GO
I got target
-------------------------------
100140720102223470000103
200XXXX 000015000000010007000
200YY 000019000000010001600
200Z 000007000000010011200
3000000004100000
Why T-SQL kill blanks ?
( This editor kill blanks in my original post)
My original pos is on