How do we check null value for Select Statement
I have written one co-related query for performance issue. In that select statement i am taking some balances fields from some different tables to calculate the balances and i am updating to some other table. i have checked null value check for each balance field. but while updating it is throwing "Cannot update the balance to NULL".some times the table is giving null value while selecting the balances from other tables. coz the table doesnt have any record on the particular day. how do i resolve this problem? can any one answer for this question?
thanks & regards,
Would you mind to copy/paste whole ORA error including ORA-NNNNN error code?
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Don't attempt to update rows where the new value would be a null, or detect that the new value is null and substitute the current value, effectively not changing it. Code, please!
How about using NVL(computed_columns,0) to update a column on another table?
You can use decode function in select statement & outer join in your defficient column for eg:
select decode(column_name,NULL,'Any String',Column_name or value)
Click Here to Expand Forum to Full Width