Bruce Van Horn
|
Posted: 06/30/2004, 2:36 PM |
|
in the parameter builder on a grid (the dialog box where you specify "is null" for a default if nothing is specified. What if you want to specify "is not null"?
I tried typing in "is not null" in the default parameter box but that doesn't work.
|
|
|
peterr
Posts: 5971
|
Posted: 06/30/2004, 7:26 PM |
|
There are many cases when the visual way of setting up the Data Source may not be sufficient and then you can switch to SQL to have more control. In the case you described you can implement own "Not Null" functionality by changing the data source type from Table to SQL and then creating the appropriate WHERE statement.
For example I just tested this SQL based on our Internet sample database and it worked OK for me:
SELECT * FROM articles WHERE category_id = {s_category_id} OR ({s_category_id}=-1 AND category_id Is Not NULL)
(I setup "s_category_id" parameter with the default value of '-1'.)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
Bruce Van Horn
|
Posted: 07/07/2004, 11:16 AM |
|
{s_category_id}=-1? That's so stupid its brilliant
Thanks!
|
|
|
|