Douglas P. Webb (dw...@cetac.com) wrote:
: I have a Master/Detail Table pairing and I was planning to use a DateTime
: stamp as a Key by which the associated Detail records could be found.
: I have table joins like
: tquery.SQL.add('SELECT * FROM DETAILTABLE, MASTERTABLE WHERE '+
: DETAILTABLE.DateTimeKey = MASTERTABLE.DateTimeKey');
I found the following local SQL statement to work fine in linking two
Paradox 5.0 tables via Timestamp fields:
SELECT P."PStamp" , C."CStamp"
FROM "PSTAMP.DB" P, "CSTAMP.DB" C
WHERE ( P.PStamp = C.CStamp )
In this example, PSTAMP.DB is the master table, while CSTAMP.DB the
detail table. The data for the Timestamp fields was produced in a
manner the same as yours: storing the return value from the Now function
into a variable, adding a single record to the master table and multi-
ple records to the detail, the field value for the Timestamp fields
coming from the variable.
: I've tried filling in a constant pasted directly from the Database
: Desktop. I've tried to do the SQL in the Database Desktop. In each
: of these cases the result set has no records when it should contain 4.
: The Delphi manuals are very sparse about SQL in general and about use
: of DateTime fields as indexes in particular.
: Has anyone done this successfully?
: BTW. I've had not problems with fields of type integer, Float or String.
: Douglas P. Webb | Life is a Game
: CETAC Technologies Inc. | The object of which is . . .
: dw...@cetac.com 402-733-2829 | To find out the Object of the Game
: Views expressed here are mine and do NOT reflect CETAC company policy.
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Steve Koterski _/ The opinions expressed here are _/
_/ koter...@borland.com _/ exclusively my own _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/