944,123 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 33763
  • MySQL RSS
Oct 19th, 2006
0

how to select null values in condition

Expand Post »
[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]
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jjerryjenson is offline Offline
1 posts
since Oct 2006
Oct 19th, 2006
0

Re: how to select null values in condition

MySQL Syntax (Toggle Plain Text)
  1. SELECT * FROM table WHERE COLUMN IS NULL
Last edited by sn4rf3r; Oct 19th, 2006 at 11:12 am.
Reputation Points: 10
Solved Threads: 2
Junior Poster
sn4rf3r is offline Offline
133 posts
since Sep 2006
Feb 11th, 2010
0

Great one and its solved my problem

Great one and its solved my problem
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jabeen1 is offline Offline
1 posts
since Feb 2010
May 18th, 2010
1
Re: how to select null values in condition
Use the COALESCE function:

COALESCE(Email, 'no email')
Last edited by Ezzaral; May 18th, 2010 at 2:14 pm. Reason: Snipped "fake sig" link. Please restrict such links to your site-wide user signature, which can be edited from the user control panel.
Reputation Points: 10
Solved Threads: 0
Light Poster
marck_don is offline Offline
26 posts
since May 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: relational db storage and search
Next Thread in MySQL Forum Timeline: Select from multiple tables





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC