Question

Adding Null and Blank fields

Rating7.8Very Good

Sybase developer here, Looking for the oracle syntax (sql)
that will retrieve a zero when two null or empty numeric fields are selected and added.

I have created a View that returns a blank column when
adding two database fields. Some records have fields
containing numbers, blanks, and nulls.  How do I add them,
and return a zero as the default when no numbers are present, and return a number when possible?  

  1. Creating Null fields in report
    I am trying to create a detail daily report in oracle but it is causing me some problems. I only want to capture data up to the day the report runs however my script is now showing me 31 days and is populating the future with the last value. How can I set the report to display null for the future days.
  2. ORACLE -- update number to null
    How can I do something like the below to update my "NUMBER(8)" column to NULL ? UPDATE gml_p_components SET mast_id = ;
  3. Query or stored procedure to return next unused…
    This hopefully is an interesting question for someone, and maybe there are some elegant solutions already out there. What I have is a table that contains a name field for a company. This name field is obviously a varchar, BUT, some of our clients only use numbers as their names. This table can be populated either via my application, or via an import ro…
  4. query to Return the number of records and outpu…
    What I am looking to do is do a select count(*) on every column in a table where it is not null and then output it to a text file. Can someone give me an example of this and send it over. Below is what I am looking to do. BEGIN   //Perform a Query  for multiple fields:  Select count(*) from CC_TABLENAME where CC_TABLENAM…
  5. sub ZERO for null
    My SQL: decode(sum(nvl(T1.F1,0)),0, sum(T2.F1), sum(T1.F1)) as lives My result set is either <NULL> or an aggragate (what this does is check the sum of Field1 in Table1 and if zero or null, checks sum of Field1 in Table2 -- if this is also NULL, the result set returns NULL). I want to sub ZERO for a…

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution
View This Solution - Start Your 30 Day Free Trial
Zone
General
Tags
blank oracle fields null
Participating Experts
2
Solution Grade
A

Replies

 
by:

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: mshaikh

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: rickwinterkorn

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: mshaikh

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: rickwinterkorn

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by: mshaikh

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Stay Connected

Oracle Around the Web

The latest Oracle news, tips, and tricks

Oracle Unveils Netra SPARC T3 Servers

New Carrier-Grade Blade and Rackmount Servers Deliver Better Performance, Density and Power Efficiency for the Communications Industry ...

read more

Oracle fixes 21 flaws in Java SE, Java for Business

Oracle is fixing 21 flaws in its Java SE and Java for Business products in its February critical patch update issued this week ...

read more

Obama’s Silicon Valley “Tech Supper”

Why was he there? Who wasn’t invited and why? What did they talk about? Why was he really there? These are the questions being debated ...

read more

Featured Oracle Experts

slightwv

slightwv has answered more than 2,000 Oracle questions and oversees database management within the U.S. Government. Slightwv

sdstuber

A regular presenter at the Collaborate conference, Oracle developer sdstuber is a top expert in PL/SQL and Oracle 9, 10 and 11. sdstuber

Testimonials

What users are saying about our experts

"The Oracle gurus provide answers, solutions and valuable workarounds"

User: schwertner

"Wow! Excellent, valuable explanation. Hats off to you"

User: aseshu70

"Solution worked fantastic and performs excellent! Thanks heaps"

User: klausbrandlhuber

Top Experts

  1. slightwv

    2,000

    0 points yesterday

    Profile

BrowseBecome an Expert