Author |
Message |
nandika.kodituwakku

Group memberships: Premium Members
Joined: 13 Sep 2016
Posts: 5
Location: Australia
Points: 55
|
|
DataStage® Release: 11x |
Job Type: Parallel |
OS: Unix |
|
Hi All,
I want to validate Longitude and Latitude and was tired with below , but seems like it didn't work properly
IF Trim(NullToEmpty(DSLink108.LONGITUDE)) >= -180.00000000 OR Trim(NullToEmpty(DSLink108.LONGITUDE)) <= +180.00000000 THEN 0
ELSE 1
IF Trim(NullToEmpty(DSLink108.LATITUDE)) >= 90.00000000 OR Trim(NullToEmpty(DSLink108.LATITUDE)) <= +90.00000000 THEN 0
ELSE 1
Please let me know if you have much better idea to validate the same.
much appreciated
|
_________________ npk |
|
|
 |
chulett
 since January 2006
Group memberships: Premium Members, Inner Circle, Server to Parallel Transition Group
Joined: 12 Nov 2002
Posts: 42474
Location: Denver, CO
Points: 218484
|
|
|
|
|
|
That's a pretty basic "validation", it would typically include validation of both values together. However... 0 is false and that 1 (actually any non-zero value) is true but is not necessarily intuiti ...
|
_________________ -craig
I know I don't say this enough, but I like when you talk to me. It's much better than when nobody talks to me. Or when people that I don't like will not stop talking to me.
|
|
|
 |
qt_ky

Group memberships: Premium Members
Joined: 03 Aug 2011
Posts: 2724
Location: USA
Points: 20365
|
|
|
|
|
|
Change each OR to AND.
|
_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
|
|
|
 |
chulett
 since January 2006
Group memberships: Premium Members, Inner Circle, Server to Parallel Transition Group
Joined: 12 Nov 2002
Posts: 42474
Location: Denver, CO
Points: 218484
|
|
|
|
|
|
There's a small echo in here, it would seem.
|
_________________ -craig
I know I don't say this enough, but I like when you talk to me. It's much better than when nobody talks to me. Or when people that I don't like will not stop talking to me.
|
|
|
 |
qt_ky

Group memberships: Premium Members
Joined: 03 Aug 2011
Posts: 2724
Location: USA
Points: 20365
|
|
|
|
|
|
Ah, yes. I see it now, hidden amongst other ramblings!
|
_________________
Choose a job you love, and you will never have to work a day in your life. - Confucius
|
|
|
 |
chulett
 since January 2006
Group memberships: Premium Members, Inner Circle, Server to Parallel Transition Group
Joined: 12 Nov 2002
Posts: 42474
Location: Denver, CO
Points: 218484
|
|
|
|
|
|
Yes, that's me... the rambler.
|
_________________ -craig
I know I don't say this enough, but I like when you talk to me. It's much better than when nobody talks to me. Or when people that I don't like will not stop talking to me.
|
|
|
 |
UCDI

Group memberships: Premium Members
Joined: 21 Mar 2016
Posts: 300
Points: 2966
|
|
|
|
|
|
its your data, but be sure the entry is not valid if you cap it back to the desired range. That is, 250 degrees is a valid location on the earth, and you can convert it to a negative degree value to get it in the 'normal' gps range. Occasionally one runs into a device or code that gives the right answer in math terms but incorrect in gps formatting, is what I mean. Just a thought.
|
|
|
|
 |
|