TXT File with fixed length fields
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Found this in an older post:
Kryt0n wrote:In order to get the fixed width file format recognised I have had to go to the Columns tab, right click, choose Edit Row and set a Field Width value for each row (i.e. the Length field despite being set, doesn't appear to be relevant to the field width)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Yeap, but it is according to your tips.
The file input columns are like:
COD_MDL_ORG ........ char(4) nullable yes
TPO_RPT ................. char(1) nullable yes
Edit Row:
* COD_MDL_ORG
String Type : Field Width = 4
Nullable / Null Field Value = ""
* TPO_RPT
String Type : Field Width = 1
Nullable / Null Field Value = ""
What else should I set?
The file input columns are like:
COD_MDL_ORG ........ char(4) nullable yes
TPO_RPT ................. char(1) nullable yes
Edit Row:
* COD_MDL_ORG
String Type : Field Width = 4
Nullable / Null Field Value = ""
* TPO_RPT
String Type : Field Width = 1
Nullable / Null Field Value = ""
What else should I set?
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
Not sure it applies much to writing a fixed-width file but wanted to point out that your "Null field Width" values need to match the size of your char field. So:
Four spaces and one space, respectively.
Code: Select all
Edit Row:
* COD_MDL_ORG
String Type : Field Width = 4
Nullable / Null Field Value = " "
* TPO_RPT
String Type : Field Width = 1
Nullable / Null Field Value = " "
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm