Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
JM39
Creator

Find whether a value is between two numbers

Hello

I imagine this is quite simple but I'm struggling to find the answer. Essentially I'm trying to find a 'between' function. So I want to say:

If row1.MY_COLUMN is between 500000 and 610000 then use that value, else 'something else'..

Tia for any help!

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

row1.MYCOLUMN >=500000 && row1.MYCOLUMN <=610000 ? row1.MYCOLUMN : -1

 

This is an in-line IF. It says, "IF MYCOLUMN is greater than or equal to 500000 and MYCOLUMN is less than or equal to 610000, then use MYCOLUMN, else use -1".

View solution in original post

2 Replies
Anonymous
Not applicable

row1.MYCOLUMN >=500000 && row1.MYCOLUMN <=610000 ? row1.MYCOLUMN : -1

 

This is an in-line IF. It says, "IF MYCOLUMN is greater than or equal to 500000 and MYCOLUMN is less than or equal to 610000, then use MYCOLUMN, else use -1".

JM39
Creator
Author

Works perfectly, thank you! 🙂