SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Extracting all rows where the numeric values are larger than 0

Reply
Frequent Contributor
Posts: 90

Extracting all rows where the numeric values are larger than 0

This seems like a silly question, but given that I have these numeric values...

1.PNG

... why can't I use this in order to extract all rows withere Differanse is higher than 0?

2.PNG

When I try that, it just extracts all rows. I've also tried Differanse > 0, with the same lack of result.

Super User
Posts: 19,855

Re: Extracting all rows where the numeric values are larger than 0

Posted in reply to EinarRoed

Try >0.1.

You probably have some floating point errors going on, where the number is actually 0.000001 but displaying as 0.00.

There are other options if you can't use the above method as well.

Super Contributor
Posts: 356

Re: Extracting all rows where the numeric values are larger than 0

Posted in reply to EinarRoed

Also if you use not equal to zero you'll get any negative numbers and missing as well as positive numbers

Trusted Advisor
Posts: 1,137

Re: Extracting all rows where the numeric values are larger than 0

Posted in reply to EinarRoed

Hi,

i see that the values in the column are aligned to the left, as you know character values are aligned to the left and numeric values are aligned to the right. So i believe the values of column Differanse are character. Try to convert them into numeric and then try what you have mentioned in the post above.

or else you can use Differanse^="0,00". Hope this helps you.

Thanks,
Jagadish

Thanks,
Jag
Super Contributor
Posts: 356

Re: Extracting all rows where the numeric values are larger than 0

Posted in reply to Jagadishkatam

Jagadish

Looking at the column header and the image (from DIS) it is a numeric field with a format applied (which is probably aligning to the left)

Barry

Trusted Advisor
Posts: 1,137

Re: Extracting all rows where the numeric values are larger than 0

Posted in reply to twocanbazza

i agree with you Barry, did not observe that.

Thanks

Jagadish

Thanks,
Jag
Super User
Posts: 5,437

Re: Extracting all rows where the numeric values are larger than 0

Posted in reply to EinarRoed

Consider how this columns gets populated. Integers (including zero) should normally work properly with such conditions.

You may want to use the round() function to get control of your data.

Data never sleeps
Ask a Question
Discussion stats
  • 6 replies
  • 348 views
  • 6 likes
  • 5 in conversation