Jim Allan wrote:
We get a lot of data in Excel format and we use Calc to convert it to
DBF. To avoid the conversion problem you mention, we normally just stick
“,c” after the column title name to force conversion into character
format before it is saved to DBF. That is, if cell A1 contained the
value “NAME” we would change it to “NAME,c”.
That avoids a lot of problems.
On the rare occasion that we want something to revert to genuine
database numeric format or database datetime format we can change the
type within the DBF file. But that is very rarely needed.
We have a routine that will add the “,c” and convert automatically, but
we normally do it manually, because at that point we want to actually
look at the input file and often want to change the column names to
better fit our own norms for example “Customer Address Line 1” to
“ADDR1,c”.
Absolutely - just moving everything over as Character fields is done a
lot - for dbf files particularly. Depending on why one is moving to the
db this may be all that is required and if so is by far and way the
easiest way to go.
The trick of going back later and just converting a column type from
CHAR to Date for instance is a nice feature of dBase ( Yes Andreas I did
say something nice about dBase, you can get up off the floor now )
- and depending on the actual storage engine used - MySQL.
For many (most) other RDBMS that is not allowed - but they all allow you
to do this by use of a SELECT INTO along with a CAST (or
other)function...anyway, I think we are getting into the weeds a little
on this subject and doubt it is of general interest.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]