dbTalk Databases Forums  

Flat File import

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Flat File import in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bigal
 
Posts: n/a

Default Flat File import - 12-27-2005 , 03:37 PM






Hello,

I need to import data from a flat file into a sql server 2000 database. The
Fate file has no delimiters. I have the specs for this file so I do knowthe
layout of this file. Can somebody point me in the rigvht direction to
accomplish this.

Thanks

Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Flat File import - 12-27-2005 , 03:55 PM






Just use the DTS import wizard and follow the prompts. You say it is not
delimited so it must be fixed width which the wizard usually figures out on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,

I need to import data from a flat file into a sql server 2000 database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction to
accomplish this.

Thanks



Reply With Quote
  #3  
Old   
Bigal
 
Posts: n/a

Default Re: Flat File import - 12-27-2005 , 08:39 PM



Thanks for your reply. The file is fixed but the data is not properly lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Quote:
Just use the DTS import wizard and follow the prompts. You say it is not
delimited so it must be fixed width which the wizard usually figures out on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000 database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction to
accomplish this.

Thanks




Reply With Quote
  #4  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Flat File import - 12-27-2005 , 09:38 PM



It is either fixed length or it is not. If all the columns are not the same
width in all the rows for each column it is not a fixed width. Or the file
needs manual work to get it there. Without delimiters you need some way to
determine where one column starts and one ends.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks for your reply. The file is fixed but the data is not properly
lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Just use the DTS import wizard and follow the prompts. You say it is not
delimited so it must be fixed width which the wizard usually figures out
on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000 database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction to
accomplish this.

Thanks






Reply With Quote
  #5  
Old   
Bigal
 
Posts: n/a

Default Re: Flat File import - 12-28-2005 , 08:21 AM



Dont know the terminology so I will explain this the best I can. Every field
is in a fixed postion. See example

Field Type RG Line Column Width
Print Width
-----------------------------------------------------------------------------------------
:WALM816Btest: Literal Text 0 1 1 0 10

0000 Literal Text 0 2 1 1
4
BHT02 AlphaNumeric 0 2 5 2 2

BHT01 AlphaNumeric 0 2 7 4
4
BHT03 AlphaNumeric 0 2 11 50
50


"Andrew J. Kelly" wrote:

Quote:
It is either fixed length or it is not. If all the columns are not the same
width in all the rows for each column it is not a fixed width. Or the file
needs manual work to get it there. Without delimiters you need some way to
determine where one column starts and one ends.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:9636EC2C-EF2D-40D3-8002-5D9094BE5823 (AT) microsoft (DOT) com...
Thanks for your reply. The file is fixed but the data is not properly
lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Just use the DTS import wizard and follow the prompts. You say it is not
delimited so it must be fixed width which the wizard usually figures out
on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000 database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction to
accomplish this.

Thanks







Reply With Quote
  #6  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Flat File import - 12-28-2005 , 08:43 AM



Now you have lost me even more<g>. Are you saying that a data row spans
multiple rows in the file? Can you just post a sample of the actual file?

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote

Quote:
Dont know the terminology so I will explain this the best I can. Every
field
is in a fixed postion. See example

Field Type RG Line Column
Width
Print Width
-----------------------------------------------------------------------------------------
:WALM816Btest: Literal Text 0 1 1 0 10

0000 Literal Text 0 2 1 1
4
BHT02 AlphaNumeric 0 2 5 2
2

BHT01 AlphaNumeric 0 2 7 4
4
BHT03 AlphaNumeric 0 2 11 50
50


"Andrew J. Kelly" wrote:

It is either fixed length or it is not. If all the columns are not the
same
width in all the rows for each column it is not a fixed width. Or the
file
needs manual work to get it there. Without delimiters you need some way
to
determine where one column starts and one ends.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:9636EC2C-EF2D-40D3-8002-5D9094BE5823 (AT) microsoft (DOT) com...
Thanks for your reply. The file is fixed but the data is not properly
lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Just use the DTS import wizard and follow the prompts. You say it is
not
delimited so it must be fixed width which the wizard usually figures
out
on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000
database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction
to
accomplish this.

Thanks









Reply With Quote
  #7  
Old   
Bigal
 
Posts: n/a

Default Re: Flat File import - 12-28-2005 , 09:06 AM



Here is a sample
:WALM816B:
0000000065200512251206N000000
12/25/2005WAL-MART STORES, INC.
10000000001 35
1100CQ WAL-MART STORES
0078742000008 HOME OFFICE
702 SW 8TH STREET
BENTONVILLE AR72716 US

0519577690000


10000000002 0000001 36
1100SN WAL-MART SUPERCENTER 0001
0078742000015 2110 WEST WALNUT

ROGERS AR72756 US
479-636-3222
0519577690001
00001

10000000003 0000001 36
1100SN WAL-MART SUPERCENTER 0002
0078742000022 1417 HWY 62/65 N

HARRISON AR72601 US
870-365-8400
0519577690002
00002


"Andrew J. Kelly" wrote:

Quote:
Now you have lost me even more<g>. Are you saying that a data row spans
multiple rows in the file? Can you just post a sample of the actual file?

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:8B6A40D9-94CF-439F-B8F7-D5968814B400 (AT) microsoft (DOT) com...
Dont know the terminology so I will explain this the best I can. Every
field
is in a fixed postion. See example

Field Type RG Line Column
Width
Print Width
-----------------------------------------------------------------------------------------
:WALM816Btest: Literal Text 0 1 1 0 10

0000 Literal Text 0 2 1 1
4
BHT02 AlphaNumeric 0 2 5 2
2

BHT01 AlphaNumeric 0 2 7 4
4
BHT03 AlphaNumeric 0 2 11 50
50


"Andrew J. Kelly" wrote:

It is either fixed length or it is not. If all the columns are not the
same
width in all the rows for each column it is not a fixed width. Or the
file
needs manual work to get it there. Without delimiters you need some way
to
determine where one column starts and one ends.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:9636EC2C-EF2D-40D3-8002-5D9094BE5823 (AT) microsoft (DOT) com...
Thanks for your reply. The file is fixed but the data is not properly
lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Just use the DTS import wizard and follow the prompts. You say it is
not
delimited so it must be fixed width which the wizard usually figures
out
on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000
database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction
to
accomplish this.

Thanks










Reply With Quote
  #8  
Old   
Bigal
 
Posts: n/a

Default Re: Flat File import - 12-28-2005 , 09:07 AM



Sample:

:WALM816B:
0000000065200512251206N000000
12/25/2005WAL-MART STORES, INC.
10000000001 35
1100CQ WAL-MART STORES
0078742000008 HOME OFFICE
702 SW 8TH STREET
BENTONVILLE AR72716 US

0519577690000


10000000002 0000001 36
1100SN WAL-MART SUPERCENTER 0001
0078742000015 2110 WEST WALNUT

ROGERS AR72756 US
479-636-3222
0519577690001
00001

10000000003 0000001 36
1100SN WAL-MART SUPERCENTER 0002
0078742000022 1417 HWY 62/65 N

HARRISON AR72601 US
870-365-8400
0519577690002
00002


"Andrew J. Kelly" wrote:

Quote:
Now you have lost me even more<g>. Are you saying that a data row spans
multiple rows in the file? Can you just post a sample of the actual file?

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:8B6A40D9-94CF-439F-B8F7-D5968814B400 (AT) microsoft (DOT) com...
Dont know the terminology so I will explain this the best I can. Every
field
is in a fixed postion. See example

Field Type RG Line Column
Width
Print Width
-----------------------------------------------------------------------------------------
:WALM816Btest: Literal Text 0 1 1 0 10

0000 Literal Text 0 2 1 1
4
BHT02 AlphaNumeric 0 2 5 2
2

BHT01 AlphaNumeric 0 2 7 4
4
BHT03 AlphaNumeric 0 2 11 50
50


"Andrew J. Kelly" wrote:

It is either fixed length or it is not. If all the columns are not the
same
width in all the rows for each column it is not a fixed width. Or the
file
needs manual work to get it there. Without delimiters you need some way
to
determine where one column starts and one ends.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:9636EC2C-EF2D-40D3-8002-5D9094BE5823 (AT) microsoft (DOT) com...
Thanks for your reply. The file is fixed but the data is not properly
lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Just use the DTS import wizard and follow the prompts. You say it is
not
delimited so it must be fixed width which the wizard usually figures
out
on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000
database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction
to
accomplish this.

Thanks










Reply With Quote
  #9  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Flat File import - 12-28-2005 , 10:06 AM



It's hard to tell what it really looks like since the ng wraps text. But
other than the first part ":WALM816B:" the rest of it looks like a typical
fixed width format. You may be able to get by using the wizard and this
file as is if you tell the wizard to skip the first line. Otherwise you may
have to preprocess the file and remove that line. Once you deal with that
first line the wizard should automatically pick up on the width of each
column. If not you can manually set the width by dragging the column lines
around in the gui. Have you tried the wizard? If so what are the actual
problems you are having?


--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote

Quote:
Sample:

:WALM816B:
0000000065200512251206N000000
12/25/2005WAL-MART STORES, INC.
10000000001 35
1100CQ WAL-MART STORES
0078742000008 HOME OFFICE
702 SW 8TH STREET
BENTONVILLE AR72716 US

0519577690000


10000000002 0000001 36
1100SN WAL-MART SUPERCENTER 0001
0078742000015 2110 WEST
WALNUT

ROGERS AR72756 US
479-636-3222
0519577690001
00001

10000000003 0000001 36
1100SN WAL-MART SUPERCENTER 0002
0078742000022 1417 HWY 62/65
N

HARRISON AR72601 US
870-365-8400
0519577690002
00002


"Andrew J. Kelly" wrote:

Now you have lost me even more<g>. Are you saying that a data row spans
multiple rows in the file? Can you just post a sample of the actual file?

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:8B6A40D9-94CF-439F-B8F7-D5968814B400 (AT) microsoft (DOT) com...
Dont know the terminology so I will explain this the best I can. Every
field
is in a fixed postion. See example

Field Type RG Line Column
Width
Print Width
-----------------------------------------------------------------------------------------
:WALM816Btest: Literal Text 0 1 1 0
10

0000 Literal Text 0 2 1
1
4
BHT02 AlphaNumeric 0 2 5 2
2

BHT01 AlphaNumeric 0 2 7 4
4
BHT03 AlphaNumeric 0 2 11 50
50


"Andrew J. Kelly" wrote:

It is either fixed length or it is not. If all the columns are not
the
same
width in all the rows for each column it is not a fixed width. Or the
file
needs manual work to get it there. Without delimiters you need some
way
to
determine where one column starts and one ends.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:9636EC2C-EF2D-40D3-8002-5D9094BE5823 (AT) microsoft (DOT) com...
Thanks for your reply. The file is fixed but the data is not
properly
lined
up to import it the way it is.

"Andrew J. Kelly" wrote:

Just use the DTS import wizard and follow the prompts. You say it
is
not
delimited so it must be fixed width which the wizard usually
figures
out
on
it's own. Go to tools - Import in EM.

--
Andrew J. Kelly SQL MVP


"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote in message
news:2703AEDB-8A50-4D2D-B461-4F98F61DCCE0 (AT) microsoft (DOT) com...
Hello,

I need to import data from a flat file into a sql server 2000
database.
The
Fate file has no delimiters. I have the specs for this file so I
do
knowthe
layout of this file. Can somebody point me in the rigvht
direction
to
accomplish this.

Thanks












Reply With Quote
  #10  
Old   
David Henson
 
Posts: n/a

Default Re: Flat File import - 01-03-2006 , 11:18 AM



This is an EDI file. DTS will in no way handle this file.

You will have to write something in C#, purchase a third party app to parse
this file(5K and up), or pay a service provider to translate it into
something database oriented.

Good luck...this is a BIG job.

-Dave Henson
dhenson (AT) certifiednetworks (DOT) com

"Bigal" <Bigal (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,

I need to import data from a flat file into a sql server 2000 database.
The
Fate file has no delimiters. I have the specs for this file so I do
knowthe
layout of this file. Can somebody point me in the rigvht direction to
accomplish this.

Thanks



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.