Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

NULL Dates AddCriteriaField

edited October 2006 in General
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

Comments

  • edited October 2006
    Hi Andy,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2006
    Hi Nico

    I assume this means an upgrade to 9 ?
    I support we should have it anyway.

    Thanks

    ANdy

This discussion has been closed.