One more question in writing a If condition!!
I am trying to filter data using if condition where I need to compare two fields. For example:
Let the fields be
1.Flag: which has only 1 and 0 value in it.
2. Name: This field has data something like this
4. Num : This field has data something like this :
Note :Starting of some data in Num field resembles the data in Name. For example
I need to bucket in the data for a field called "room" for a condition
Flag =1 or
Num = only that data which Starts with Name field.( Example = abc_123, bcd_567, rfg_675).
So expression should be like
If( Flag ='1' or Num = ' Like Name', Name, Cname) as room.
I hope I have explained in a simple way. Thank you.
May be use this If( Flag =1 or Num like Name, Name, Cname) as room
Thanks for the reply, I am getting the data when the condition is true but this time it's not bucketing the data if condition is false. That means the values for Cname are not populating.