sql - Selecting all with a length of less than 8 characters, and not null, and not empty -


How do I select all the values ​​that are in length less than 8 characters, and not a zero value and not empty Is value?

This is what I have, but it is still pulling in empty values ​​

  select different alphax, case when LAN (termdatex) 8 then the termdatex end termdatex as the table where the termetax is zero and the termdatex is not! = ''    

Your problem is in your case expression Clearly, when is not returned as null in any of the sections, then nothing is handled. Here, since you do not filter them in where , return any string with 8 or more characters as null as case Expression To correct this, you can move all of your logic to the where section:

  select alphabetically, some decad termetaxes, Where the termdatex is not and nor the wording! = '' And LAN (termdatex) & lt; 8    

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 -