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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using if condition with blank spaces

Status
Not open for further replies.

paramsocool

Programmer
Jan 3, 2007
13
US
Hi

I am trying to use an if condition with a table column that has Null or blank spaces. I am able to handle Null with if else but I am not able to figure out how to handle blank space condition as

if (value)=' '

becuase the blank space can be variable and I want to satisfy both the null and blank conditions together.

please advice.
 
To test for it use:

if isnull({table.field})
or
trim({table.field}) = ""
"null or blank"
else
"has a value"

You don't state where or what you want to do once you determineit's null or blank, try posting specifics in the future.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top