On 7/11/2013 10:15 AM, Peter Cushing wrote:
MB Software Solutions, LLC wrote:
<snip>
ALTER table DBF("crap") drop COLUMN datepaid drop COLUMN lastdos

...but it gives me a "File is in use" error.  I could have swore I did
this before successfully.  What am I doing wrong?

Not sure why you would want to get rid of the columns on a cursor
anyway.  It's just a temporary table to do a bit of work in, then you
can update some actual tables and close it.  The extra fields are not
going to affect anything.  Is it just to keep things a bit neater?


Aah...good point. Let me explain. The permanent table gets this data once it's munged.

So MyTableOnDisk has this structure:
CREATE TABLE MyTableOnDisk FREE (provnum c(9), datepaid d, lastdos d, reimbamt n(15,2), bonusamt n(15,2), filename v(200), tstamp t)

The temporary cursor exists for the APPEND FROM <textfile> DELIMITED. The input file has this format: provnum c(9), datepaid c(8), lastdos c(8), reimbamt n(15,2), bonusamt n(15,2)

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

Make sense now? Is there a better way? I did think of just leaving the date fields as C(8) and just rewriting the query logic (in a later UI) to search in MMDDYYYY fashion, but I liked the idea of dealing with actual dates (for now, anyway).

How would you handle it?

tia,
--Mike

--
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16

_______________________________________________
Post Messages to: ProFox@leafe.com
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/51deeb84.4050...@mbsoftwaresolutions.com
** 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