Hello,
I try to use a tableFilter to filter all records that do not have a 1 in a certain column. If I use
databaseManager.addTableFilterParam(server, table, column, '=', '^');
Servoy translates this into
WHERE column = ?
instead of
WHERE column IS NULL
I can’t do
databaseManager.addTableFilterParam(server, table, column, '!=', '1');
because then I don’t get the NULL values. In my case, the column either contains a 1 or it is null. So I am locked out.
Can this be fixed, so a WHERE column IS NULL is generated?
Maybe an even nicer option would be to translate ‘!=’, ‘1’ into
WHERE column IS NULL OR column <> 1
While testing with foundsetFilters I saw this statement once or twice and actually had the data I wanted. But now I can’t reproduce it!?
why can’t you just filter on null:
databaseManager.addTableFilterParam(server, table, column, ‘=’, null);
or not on null
databaseManager.addTableFilterParam(server, table, column, ‘!=’, null);
Harjo
August 28, 2007, 10:51am
5
but how do we filter null or empty?
like we can when we do a search: ‘^=’
Yes, I think the translation from ^ etc. would be helpful and somewhat consistent in a Servoy context. In my case, I am happy now, because a flag_deleted (what I have here) will never be reversed, so it will never become 0 or something else. It’s either 1 or null.