Major brain fart here, but how do I apply an expression to a table critera?
I need to do this basic SQL but in a BAQ:
select count(*)
from UD100A
where Character01 = 'Deallocated'
and Convert(datetime, ChildKey1) >= GETDATE()-1
And I can’t for the life of me think of how to apply the second part, the Convert(datetime, ChildKey1) to the BAQ editor as I can only select the field, give it an operation, and then have options for filter values
Ok I wasn’t sure if it would handle the datatypes well but it appears to be ok with just setting the expression like that
In this case ChildKey1 is a string that is storing a datetime, but seems a little error prone without the ability to set the lefthand side of the equation
I’m fond of this one I also like adding
OR 1 = 1 when I want to by pass a check temporarily without messing up the existing criteria (While developing)
I’m willing to bet if you hit Analyze the error will be “Possible SQL Injection”. There was an update they put in to fix it recently (10.2.500 or 600?).