Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
2 replies
Subscribers
7 subscribers
Views
888 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I created a query rule in which I am going up against a database and checking to
tonyc
over 10 years ago
I created a query rule in which I am going up against a database and checking to see if a value is null. The column in question is called COP_NUM. In the attached screenshot, the column is populated with "NULL". When I use the following SQL statement outside of Appian, I get back the correct rows:
select * from ppe_reports.dbo.cop_automation
where cop_Num IS NULL
My query rule uses the condition COP_NUM=COP_NUMValue. I do not know what value to pass to COP_NumValue in a query expression to make the query work. I tried entering nothing, then "", and then '' but with no sucess. Can anyone help? Thank you. ...
OriginalPostID-109907
OriginalPostID-109907
Discussion posts and replies are publicly visible
0
Bishnu Panigrahi
Appian Employee
over 10 years ago
Unless you are using the "includes" operator, you can't pass a null value into a query rule. Here are a few alternatives:
1. Use a query database node: ex. select <fieldA> from <table> where <fieldB> is not NULL
2. Create a view that filters the rows based on these null values. Then query that table.
3. Use a query rule to call back a bigger datasubset, then filter nulls in process.
There are positives and downsides to each scenario, so think about each one before implementing.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
tonyc
over 10 years ago
I actually need to get back the rows where COP_NUM is null
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel