Board index » off-topic » SQL query on Date Field
|
George
Delphi Developer |
SQL query on Date Field2003-11-15 02:49:49 AM off-topic19 Hi All I have Paradox table (Tmp.db) which includes a received date (DATEIN) and a shipped date (DATEOUT). Some of the DATEOUT fields are empty as the unit hasn't been shipped. How do I retrieve these records? I am using Delphi3 standard and the database is on the same PC. The following is a piece of the code. DataModule1.Query1.Close; DataModule1.Table2.Close; DataModule1.Query1.SQL.Clear; DataModule1.Query1.SQL.Add('select * from Tmp.db'); DataModule1.Query1.SQL.Add('where (DATEOUT>:TDate)'); DataModule1.Query1.SQL.Add('or (DATEOUT < :FDate)'); DataModule1.Query1.ParamByName('TDate').AsDate := StrToDate('12/31/2003'); **The following statement doesnt work. What I need is a method to retreive records with empty DATEOUT fields............ DataModule1.Query1.ParamByName('FDate').AsDate := StrToDate('00/00/00'); DataModule1.Query1.ExecSQL; Thank you, George |
