dear colleagues,
i am tying to perform a correlation between 2 variables with an if condition but i get different results depending on the code i use though i thing the codes mean the same thing. i don't see where the problem is. my condition is that BMI is between 22.9 and 27.4. which code is the right one?


Code:
pwcorr bmi ssaauml if 22.9<bmi<27.4, sig

bmi ssaauml

bmi 1.0000


ssaauml -0.1208 1.0000
0.0000

Code:
pwcorr bmi ssaauml if bmi>22.9  & bmi<27.4,   sig

bmi ssaauml

bmi 1.0000


ssaauml -0.0541 1.0000
0.2991

Thanks in advance

stata 15.1 mac