Skip to Content

Query Based on Column Value = 0 is not working

hi ,

I have a table D***_*****REG in Hana Data base , where value of colum named Tot_score is '0' and its key is '1101058365' .

When i query as " SELECT CALL_REGNO , TOT_SCORE FROM D***_*****REG WHERE CALL_REGNO = '1101058365' I get below

Now with Query "

SELECT CALL_REGNO , TOT_SCORE FROM D***_*****REG WHERE CALL_REGNO = '1101058365' AND TOT_SCORE = 0 "

I get No Output as shown below

Why is the Out Put not coming when Selecting Tot_Score = 0 ?

here 0 is numerical Zero.

Regards

Govardan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 17, 2019 at 12:37 PM

    I can see a couple of probabilities.

    1. Column value is not pure 0, it might be '0 ' that why it's not working. Try trimming the value

    2. Column might be some type of LOB so before comparing to 0 it should be converted to number

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.