sql - Getting wrong result when converting percentage field to float -


I have a question that should display some data based on certain criteria.

The following conditions in my query when displaying data to me:

Cast (percent in float form) / 100 & lt; 0.50) which should give me a price of at least 50%.

However, while executing the query, I get prices like 95, 100 ... but I do not give less than 0.50, even if I have specified the condition in a query.

To select any of the tables, check to see if the value is 0.95:

select cast (float as percentage) / 100 table 1 Where id = '1111'

What am I doing wrong? And what's the solution?


This is my where is the block:

  WHERE msystem = '111' AND ((code = '2222' and cast ( Percentage as float) / 100 & lt; 0.50) or (code = '3333'))    

This code is here:

  (code = '2222' and cast (percentage as float) / 100 & lt; 0.50) or (code = '3333')   

This is the second part of or (code = '3333') allowing for more than 0.50 results

the way From where do you have any section written, it gives you any results In which the code = '3333' and only the results which have the code = '2222' which is less than 0.50

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -