select even column is null oracle

the command below is my sql select command;

sqlcommand = "SELECT * FROM INVENTORY WHERE LOWER(SAPNO) LIKE LOWER('" + sapNo + "%') AND LOWER(PARTDESC) LIKE LOWER('" + partDesc + "%') AND LOWER(PARTNO) LIKE LOWER('" + partNo + "%') AND MINQTY = '" + minQty + "' AND QOH = '" + QOH + "' AND LOWER(CATEGORY) LIKE LOWER('" + category + "%') AND LOWER(EQUIPMENT) LIKE LOWER('" + equipment + "%')";

example like category and equipment is confirm null. and the rest have the value. How can I select the row even though category and equipment is null?? because I using this comment whenever equipment and category is null, the data wont be shown!

your comment is much appreciated!!
TQ


Source: oracle

Leave a Reply