NULL Dates AddCriteriaField
Hi
Anyne know a way to reproduce this code - or effect of this code using this
style of code ?
lQueryDataView.SQL.AddCriteriaField(lTbl, 'DESP_DATE',
dacoLessThanOrEqualTo, cStartDespDate);
AND( ( ordhead.DESP_DATE <= '2099-12-31' ) or
( ordhead.DESP_DATE is NULL ))
The field DESP_DATE will always start NULL because goods are not yet
delivered.
NULL records are not displayed using Advantage database engine, so are
exluded from reports when using :
lQueryDataView.SQL.AddCriteriaField(lTbl, 'DESP_DATE',
dacoLessThanOrEqualTo, cStartDespDate);
Many thanks
ANdy Dble
Anyne know a way to reproduce this code - or effect of this code using this
style of code ?
lQueryDataView.SQL.AddCriteriaField(lTbl, 'DESP_DATE',
dacoLessThanOrEqualTo, cStartDespDate);
AND( ( ordhead.DESP_DATE <= '2099-12-31' ) or
( ordhead.DESP_DATE is NULL ))
The field DESP_DATE will always start NULL because goods are not yet
delivered.
NULL records are not displayed using Advantage database engine, so are
exluded from reports when using :
lQueryDataView.SQL.AddCriteriaField(lTbl, 'DESP_DATE',
dacoLessThanOrEqualTo, cStartDespDate);
Many thanks
ANdy Dble
This discussion has been closed.
Comments
When altering or adding search criteria to a QueryDataView, I recommend
taking a look at the TdaSQLBuilder object, added for RB 9.x and higher.
This gives you an easy way to create and customize the SQL object with a set
of easy to use/understand routines. Take a look at the TdaSQLBuilder topic
in the RBuilder help file for more information and examples.
Specifically take a look at the TdaSQLCriteriaList class which is the
TdaSQLBuilder.SearchCriteria property. Adding multiple search criteria is
the equivalent of using the AND in SQL and you are given a routine
InsertOr() for the OR cases.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I assume this means an upgrade to 9 ?
I support we should have it anyway.
Thanks
ANdy