if else condition in RRDI query
I have 2 columns in a query in RRDI (column a & column b). i want to insert a data item with the if else condition. The condition is if the value in column a is equal to column b then print no change else print the value of column a itself. Can you please help me with the syntax of this if else condition.I am facing difficulty with the else statement. It is not allowing me to print the value of column a. However if I enter some string over there, it works fine.
2 answers
Hi Naveen Chandani,
You must to observe what kind of data you are printing.
For example:
if the column A is a string
if (column A = column B) then ('1') else (column A)
if the column A is integer
if (column A = column B) then (1) else (column A)
Note the quotes when you use a string column.
You must to observe what kind of data you are printing.
For example:
if the column A is a string
if (column A = column B) then ('1') else (column A)
if the column A is integer
if (column A = column B) then (1) else (column A)
Note the quotes when you use a string column.