I searched the llblgen documentation, but didn't find a aggregate function for isnull.
What i'm trying to do :
SELECT something
FROM sometable
WHERE isnull(somedatefield, '3000/01/01') >= '2004/10/31'
Can we easily extend llblgen to support this aggregate function? A sort of customer extension with use of base classes from llblgen.
I searched the llblgen documentation, but didn't find a aggregate function for isnull.
What i'm trying to do :
SELECT something
FROM sometable
WHERE isnull(somedatefield, '3000/01/01') >= '2004/10/31'
Can we easily extend llblgen to support this aggregate function? A sort of customer extension with use of base classes from llblgen.
Isn't that query the same as:
SELECT something
FROM sometable
WHERE (somedatefield >= '2004/10/31'
OR somedatefield IS NULL)
?
if so, you can do that with 2 predicates in a predicate expression
, you're right.
For this case this workaround is correct.
But in case I want to implement really the, for example, 'isnull' aggregate function. Is there a possibility to implement this without changing the source code of llblgen? A custom class derived from a llblgen class to implement the new aggregate function?
ISNULL() is used to give valid values for NULL values for a particular field. This is already done by teh generated code: a field of type T will get the default value defined in TypeDefaultValue.cs/vb
In predicates, you can always work around this using an IS [NOT] NULL predicate.
If I'm mistaken, could you please give an example of a query you need it for?
No, you helped me already with a solution for my problem.
It was just a theoretical question. If I wanted to implement a not yet implemented aggregate function, what was the best way to follow...