What is the date type of DateTimeAdded? There is a CONVERT function in SQL
Server which could work for you, but it depends on the date type of
DateTimeAdded.
Dennis.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Derricutt, Mark
> Sent: Wednesday, 8 March 2000 09:55
> To: Multiple recipients of list database
> Subject: [DUG-DB]: Dates in SQL7
>
>
> Question, in Paradox I made use of the following query:
>
> INSERT INTO CalculatedDates
> SELECT DISTINCT
> CAST(DateTimeAdded AS DATE) AS GoodDate
> FROM
> ImportData
> WHERE
> FilterResult NOT IN (2,4) AND DateTimeAdded IS NOT NULL
> AND Val IS NOT
> NULL
>
> Which simply filled the CalculatedDates table with a unique
> list of "days"
> that existed in ImportData matching the specified criteria. Now, SQL7
> doesn't actually -have- a DATE datatype, only DATETIME so
> this query fails.
> I was just looking at the DATEPART() function but that only
> seems to return
> indivudal elements likes day, month, year etc. etc. and not
> the actual date
> portion.
>
> Does anyone know of any tricky but simple ways to do this
> with query against
> SQL7? In an attempt to keep every generic SQL I may end up
> parsing the
> ImportData table in code and then inserting the records
> (although not as
> nice, it would keep it non-db specific).
>
> Thoughts?
>
> Mark
>
> --
> Mark Derricutt "People in prayer for me, everyone there for me,
> ICQ: 1934853 sometimes I feel I should face this alone, my
> Wrk: 377-9941 soul exposed... it calm's me to know that I
> Fax: 377-9947 won't!" = Dream Theater - Scarred
> DDI: 375-3754
>
> Now Playing: <no audio cd present>
> --------------------------------------------------------------
> -------------
> New Zealand Delphi Users group - Database List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz