Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to import a flat file (not delimited)

Featured Replies

I need to create a script to import a file into my database, that is not tab delimeted (a flat file). Its records are defined with a return, however each field is a designated number of characters long and not separated.

Eg:

field 1 = 9 characters

field 2 = 30 characters

field 3 = 10 characters etc.

There are no tabs, commas or semicolons separating the fields.

Thanks for any help!! Much appreciated.

Is this a one-time conversion, or do you have to do this periodically?

  • Author

Quite regularly (several times a day!) so it would be great to script it and be able to click a button and voila!!

Import into a temp table (with the entire record mapped to a single field). In this table, define calculation fields to parse out field data, e.g.

cField1 = Left ( ImportedField ; 9 )

cField2 = Middle ( ImportedField ; 10 ; 30 )

and so on. Now import the temp records into your real table, mapping the calc fields to your real fields.

You could also import directly into your real table, and use auto-entered calculations in your real fields - but that "dirties up" your table with redundant data and can interfere with normal operations (for instance, if you need another auto-entered calculation when a new record is created manually).

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.