Compare Salary among Arrays ()

1

I have the following Query:

SELECT * FROM folhapagamento_storages WHERE idFolhaParametro = '1' AND valor_min >= '1083.4' AND valor_max <= '1083.4'

Only the return will always be 0, what would you be doing wrong? What would be the correct logic?

In this case, you would only have to return to track 1, as a result, and it is zeroed ...

    
asked by anonymous 05.10.2015 / 18:25

2 answers

3
SELECT * FROM folhapagamento_storages WHERE idFolhaParametro = 1 AND valor_min >= 1083.4 AND valor_max <= 1083.4

< =

You must put <= (less equal) in the query with valor_max . And decimal number does not need quotes.

    
05.10.2015 / 18:28
0

You are querying using: value_max = '1083.4'. The correct would be

05.10.2015 / 18:30