How do you check for a null value in a db2 column?
Answers were Sorted based on User's Feedback
Answer / guest
You use a null indicator on the colunm and if the null
indicator = -1 then the column has a null value.
Is This Answer Correct ? | 32 Yes | 0 No |
Answer / angoca
By querying the catalog
select nulls
from syscat.columns
where tabschema like 'XX%'
and tabname = 'YY'
and colname = 'ZZ'"
Or with the describe command
db2 describe table ZZ.YY
Is This Answer Correct ? | 1 Yes | 1 No |
What are simple, segmented and partitioned table spaces ?
Where is the access path logic created by the DB2 Optimizer stored?
What is buffrpool? Where we use it ?
What do you mean by storage group (stogroup)?
how to unload different table data into different gdg files/ vsam files.
How to retrieve rows from a db2 table in embedded sql?
What is the difference between SYNONYM and ALIAS?
How do you pull up a query which was previously saved in qmf?
A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?
In a Cobol-DB2 program, I am fetching rows from 4 tables using cursor and then based on the a field present in that table, It processes the information accordingly..for example stat-c is one digit field..if stat-c is 'D' then the a row is deleted from table and written those details in to a file. If the stat-c is 'U' then a row is updated (hardcoded what to update)in a table and written those details in to a file. If the stat-c is 'I' then a row is inserted in a table and written those details in to two files. The issue is i have to include the intermediate commits. When an abend occurs, due to commit statement db2 tables will be saved, But there will be lose of file contents. When we resubmitting the job associated with this program there will be insert ,update and delete anomolies to avoid that what measures could be taken?. The intermediate commit is nothing but issuing commit after massive inserts, updates and deletes(sum of 500actions)
What are the functions in DB2?
How would you find out the total number of rows in a db2 table?