I have a .TXT file that I would like to import to SQL Server on my machine.
The .TXT file is comma (,) delimited, with only 4 rows and 185 fields
(columns). The size of the TXT file is 4 KB.
A sample of 1 of the row in the TXT file is as follows:
"A","B"," B1","B0001","F1","OMAAA,"D",.........
In SQL Server I created a new database called "maint". I right click - All
Tasks - Import Data.
On the question "From where do you want to copy the data, I selected "Text
File" for "Data Source" and enter the filename "C:\MN.TXT"
On the file format, I selected all the default : "Delimited", File Type =
ANSI, Row Delimiter = {CR}{LF}, Text Qualifier = Double Quote {"}, Skip Rows
= 0.
On the Column delimiter, I selected the default = Comma
On the destination, I selected "Microsoft OLE DB Provider for SQL Server"
and selected my server (Local) and my database "maint".
When I run it, on the step "copy data from MN to [maint].[dbo].MN" I got an
error "Not enough storage is available to complete this operation". It
successfully created the tables and fields (columns) in the "maint"
database.
I have 24 G of free space in my machine.
Am I importing this TXT file incorrectly ?
Thanks.
Sorry, I posted too early. I found out my problem. I have to click on
"Transform" to change the field from varchar(8000) to varchar(30). This
fixed the problem. Thanks.
"fniles" <fniles@.pfmail.com> wrote in message
news:%23LxAn89rEHA.3428@.TK2MSFTNGP11.phx.gbl...
>I have a .TXT file that I would like to import to SQL Server on my machine.
> The .TXT file is comma (,) delimited, with only 4 rows and 185 fields
> (columns). The size of the TXT file is 4 KB.
> A sample of 1 of the row in the TXT file is as follows:
> "A","B"," B1","B0001","F1","OMAAA,"D",.........
> In SQL Server I created a new database called "maint". I right click - All
> Tasks - Import Data.
> On the question "From where do you want to copy the data, I selected "Text
> File" for "Data Source" and enter the filename "C:\MN.TXT"
> On the file format, I selected all the default : "Delimited", File Type =
> ANSI, Row Delimiter = {CR}{LF}, Text Qualifier = Double Quote {"}, Skip
> Rows = 0.
> On the Column delimiter, I selected the default = Comma
> On the destination, I selected "Microsoft OLE DB Provider for SQL Server"
> and selected my server (Local) and my database "maint".
> When I run it, on the step "copy data from MN to [maint].[dbo].MN" I got
> an error "Not enough storage is available to complete this operation". It
> successfully created the tables and fields (columns) in the "maint"
> database.
> I have 24 G of free space in my machine.
> Am I importing this TXT file incorrectly ?
> Thanks.
>
>
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment