OR instead of AND
Hi,
Report builder 7
Using the DADE and use the Query designer.
I can set the SEARCH criteras as AND but how to set up an OR between two
expressions i.e.instead of
WHERE
( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IN ('A1') )
AND ( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IS NULL )
I want
WHERE
( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IN ('A1') )
OR ( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IS NULL )
/Ronny
Report builder 7
Using the DADE and use the Query designer.
I can set the SEARCH criteras as AND but how to set up an OR between two
expressions i.e.instead of
WHERE
( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IN ('A1') )
AND ( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IS NULL )
I want
WHERE
( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IN ('A1') )
OR ( INSPCHECK_BASKET_1.CONNECTED_INSPCHECK IS NULL )
/Ronny
This discussion has been closed.
Comments
I found the right click and "Insert OR"
But how to do this from within Delphi
/Ronny
Tech Tip: How to add OR criteria in code
-------------------------------------------------
The 'And' operator is implied. To add an Or, Begin, End to the criteria
you need to extract the TdaSQL object and then use
TdaSQL.InsertCriteria. Below is the function declaration.
function InsertCriteria(aPosition: Integer; aType: TdaCriteriaType):
TdaCriteria;
TdaCriteriaType is defined in TdaSQL.pas as
TdaCriteriaType = (dacrField, dacrOR, dacrNOT, dacrBegin, dacrEnd);
A call would look like
lSQL.InsertCriteria(0, dacrOR);
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
--
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com