JoeJam
JoeJam

Reputation: 371

Greater Than or Equal not Working properly

I am trying to run the following code:

UPDATE sb_actprod_reins.psold_ho_mapping_trended SET EG = 14  WHERE   iexpos2 <=75 AND iexpos2 > 70;
UPDATE sb_actprod_reins.psold_ho_mapping_trended SET EG = 15  WHERE   iexpos2 <=80 AND iexpos > 75 ;

It is supposed to bucket the data based on iexpos2. It works fine between the end points. However, when it is on the endpoints e.g. 75.1 it does not fall into a bucket. Here is a sample of the output: enter image description here

As you can see the data is not getting bucketed on the endpoints. I also tried changing eg to NUMERIC from INTEGER but that did not work.

Why is this happening and how can I fix it?

Upvotes: 0

Views: 1427

Answers (1)

MarcM
MarcM

Reputation: 2251

Modify your UPDATE condition to use consistently field names:

... WHERE   iexpos2 <=80 AND iexpos > 75 ;

should be

...WHERE   iexpos2 <=80 AND iexpos2 > 75 ;

Upvotes: 3

Related Questions