On 07/11/13 10:29 AM, MB Software Solutions, LLC wrote:

I need to populate the tables from the source text files but fixed the
date field prior to importing into the final real table.

Step 1: create temporary cursor to hold import data
Step 2: append from <textfile> into cursor created in Step 1
Step 3: fixed the input so that the dates are in true date fields, not
MMDDYYYY C(8) fields
Step 4: import into RealDataTable from fixed-up cursor data
Step 5+: user queries all imported data using date ranges on those fields

That all looks reasonable. Step 3 converts the string date to a "Date" date.

But there's no need at all to do the 'Alter Table' and remove fields from the cursor. When you do the 'Append From' into your real table, the fields that match will be appended, and any others won't. You're just making yourself extra work.

This all assumes, of course, that your field names are 10 chars or less. If not, then none of this works.

Dan Covill

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to