Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL-SELECT and NULL values - HELP!
Message
From
16/09/1997 14:57:22
 
 
To
16/09/1997 14:31:58
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00050220
Message ID:
00050256
Views:
13
You're right, NVL() was the function I was trying to remember using in one of my apps, and I think it's really the only way. But someone else may know a more elegant method.

Bill


>The easiest workaround I found was doing something like
>
>SELECT NVL(MyField,SPACE(MyFieldLength)) AS MySelectField FROM ...
>
>but I wish there was an easier way. I use a whole lot of SQL's.
>
>Elyse
>
>>Hi Elyse,
>>
>>Try something like
>>
>>SELECT IIF( ISNULL( MyField ), SPACE( MyFieldLength ), MyField ) AS MySelectField FROM ...
>>
>>Bill
>>
>>>I'm running into problems with NULL values appearing in my SQL SELECT queries. Is there anyway to keep NULL values out of fields in my SQL query? All of my table fields do NOT accept NULL values. It would be very difficult to go back and re-write every SQL to check every value for ISNULL(). Is there some kind of SET NULL OFF that will work for SQL-SELECT?
>>>
>>>Thanks
>>>Elyse
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform