Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql query

Status
Not open for further replies.

rds747

Technical User
Mar 8, 2005
180
US
Table has two columns. I don't want to display columns that have an empty string.

Select * From Program Where Location <> "" Or Description <> ""

Something like that.

Thanks.
 
A result set is based on rows not columns. So with that code, if either of the columns has a NON blank result, the row will still show. Not exactly clear on what you want.
 
rds-

You need to use AND instead of OR to prevent the blank strings from getting displayed.

Select Location, Description
From Program
Where Location <> "" AND Description <> ""

HTH,

Alex
 
*prevent the rows containing a blank string from being displayed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top