Hi all,
I am currently having trouble with a simple SQL script that a TSQL just
doesn't want to accept. I have followed the date format in the
localsql.hlp file but I keep getting an invalid format message.
SQL.Add('SELECT SH.Terminal, Sum(SH.Invoice) AS TotalSale,
SH.SaleType');
SQL.Add('FROM SaleHeader.db SH');
SQL.Add('WHERE (SH.SaleType = ' + IntToStr(intCount) + ') AND
(SH.SaleDate BETWEEN "' + convertDateToUS(ReportsForm.FromDate.DateTime)
+ '" AND "' + convertDateToUS(ReportsForm.ToDate.DateTime) + '")');
SQL.Add('WHERE (SH.SaleType = ' + IntToStr(intCount) + ')');
SQL.Add('GROUP BY SH.Terminal, SH.SaleType');
SQL.Add('ORDER BY SH.Terminal');
Open;
I've tried the #mydate# which barfs, so any help would be much
appreciated
Thanks in advance
Tony
--
Tony Sinclair
Holliday Group Limited
Christchurch
New Zealand
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz