Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ALL,
When i am writing the Or after IsNull(DD_TYPE) then it is fetching the rows....but when i am writing "and" after IsNull(DD_TYPE) nothing is getting fetched ....i dont know what happming exactly .....is i am doing wrong please suggest me right answer....
Below is my code ...i want all the null records in my report ....
IsNull(DD_TYPE) and
WildMatch(DD_TYPE,'EN','NB','RW','RO','UC')
Please reply its urgent ......
Sarfaraz
Hello Sarfaraz,
Correct me if I am wrong but, if DD_TYPE is null, it will never match any value like 'EN', 'NB' os something similar, because it is a null value.
Hth.
Use Match Instead of WildMatch
and
Instead of using IsNull Try to create a Flag for Null in Script
If(IsNull(DD_TYPE) or Len(Trim(Replace(DD_TYPE,'-','')))=0, 1, 0) as DDTypeNullFlag
......
Also, use
If(IsNull(DD_TYPE)) OR
If(WildMatch(DD_TYPE,'EN','NB','RW','RO','UC'))
The data in a field will be either 'Null' or a value. But can not be both.
what ever we use WildMatch or Match..
And so in AND condition both the conditions are not satisfied. so showing no rows.
only in OR condition we its possible to get some records.
If you want the records where DD_TYPE is NULL, you should use
Where IsNull(DD_TYPE)
or
Where Len(Trim(DD_TYPE)) = 0
and no additional condition. (See Jose's answer above).
If you don't get the records you want, you can debug by removing this condition from the where-clause and put it in a field instead:
IsNull(DD_TYPE) as DebugField
HIC
Is this in your script or a chart expression. Assuming script, what is in the source record. Eg. An empty string may not return Null. Also why are you testing IsNull and Wildmatch. What is in the source and what are you trying to achieve.
If a record was Null and so true, then wildmatch would find no match and return 0 which is interpreted as false. So can never satisfy the AND.
dear all,
I want both in my record null record as well as contains Value record what shoud i have to do ,,,please tell its urgent...
Sarfaraz
If you want both records with NULL and records with an other value, you should use OR (what you initially suggested):
IsNull(DD_TYPE) or WildMatch(DD_TYPE,'EN','NB','RW','RO','UC')
HIC
Hi,
Can you explain your requirement with example?
It looks easy to solve.
Regards
You are write mr. henric.....but how i can identify that the particula recontans null value....because i am unable to find the null records in application......
Sarfaraz