954,193 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to select null values in condition

[HTML]
i am having four combo boxes.the item in the combo box is taken from the database.we select the data whatever we want and clicking the submit button report want to be displayed.
While selection in the combo boxes, they may select all the fields sometimes they may select one fields and so on.i want to display records according to the selection.to display records i am using jasper i-report.
front end: JSP back end : My SQL
The problem is in the i-report i can write only one query, i cannot check condition sometimes some field may empty or null.

please send me the query so that i can check null values(ie. if the field is null it want to select all the data regarding that field) and select regarding the data.

[/HTML]

jjerryjenson
Newbie Poster
1 post since Oct 2006
Reputation Points: 10
Solved Threads: 0
 
SELECT * FROM table WHERE column IS NULL
sn4rf3r
Junior Poster
135 posts since Sep 2006
Reputation Points: 10
Solved Threads: 2
 

Great one and its solved my problem

jabeen1
Newbie Poster
1 post since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

Use the COALESCE function:

COALESCE(Email, 'no email')

marck_don
Light Poster
26 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You