LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Data Type Definition

Hy NG,
Another question for you:

I want to access a DB, either as an Excel file or as a text file and want to
have the following data types in it:

Integer
Double
Date&Time (format: mm-dd-yyyy hh:mm:ss)
String

If I try to create a text file database, the only existing masks for the
date field are pure date types without time fields. If I try to setup my own
mask, an error occurs.

And how can I assign data types to columns in an Excel data base? The driver
tries apparently to guess the type, but it doesn't fit always...

And is it possible to select records with a
SELECT * FROM DB_TABLE1 WHERE DATE_FIELD < TODATE(05-01-2001 17:45:00)
statement? Or what other date and time comparison functions do exist?

Thanx
Harald

mailto:HIlg@g
mx.net
0 Kudos
Message 1 of 3
(3,098 Views)
I had not use Excell ( nor text files ) like a database, but if you read the "Driver Help" file at the topic "Data Types" for Excell, you can see that the timestamp type. You can probably use the format function and then choose "Date" and the good format, inside EXcell.
If you have to do lot of queries, it is better to choose another database format, like DBase, which is free.
0 Kudos
Message 2 of 3
(3,098 Views)
Hy Pierre,
thanks a lot for your respond.

> You can probably use the format function and then choose "Date"

I tried that, but it doesn't work. I think, Excel just scans the first row
of each table and tries to figure out the right format.
Unfortunately, im my database the first row doesn't contain data in every
column, so I don't get the right data types. Furthermore, every numeric
value is delivered as "Double".

> database format, like DBase, which is free.

Actually, I don't really care which format I use.
The database for now is only for development purposes, later on I'll access
an remote Oracle7, right now I just need anything to do the development.
I thought, either text files or Excel would do best, because I don't need
further software to have a look at the
raw data or manipulate it.

So, any further help would be appreciated!

Thanx
Harald

mailto:HIlg@gmx.net
0 Kudos
Message 3 of 3
(3,097 Views)