Re: How to check for NULL values in ISQL
Posted in 1995
In article <813595000snz@excelsis.demon.co.uk> Sally@excelsis.demon.co.uk I wrote: > In article <45lo6u$aqc@hazel.Read.TASC.COM> > amiller@tasc.com "Andrew Miller" writes: > > > kcj@netcom.com (Kate Juliff) wrote: > > > > >How do I check for nulls in a column of type INTEGER? > > > > Use an indicator variable for the host variable you're selecting into. The > > indicator variable will contain -1 if the field is NULL. See the "Indicator > > Variables" section of "Programming with ESQL/C for Windows" for more details. > > This will show if the column *allows* NULLs, but not if it actually > *contains* NULLs. If the later is what is required, the data will > have to be searched in some manner. > I was confused at the time! I was thinking of the system catalogues, where it is relatively easy to get the answer to 'can this column contain NULLs'. They don't give the answer to 'if it can, does it?'. Details can be seen by inspection of 'syscolumns.coltype' (unless something has happened in versions later that 5.0x!). -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================