Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Reg: Query about null value addition in a sql query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
muthukannan

New User


Joined: 03 Aug 2006
Posts: 42
Location: Chennai

PostPosted: Thu Sep 06, 2007 8:36 am    Post subject: Reg: Query about null value addition in a sql query
Reply with quote

Hi,

While adding a values in a sql query will the null values are considered or will it be omitted?

Eg.

col1 col2
----- ------
1 1
1 2
1
1 3
1 4

if we try adding the col2 using group by col1 will the null value of col2 will be considered?

Please advice...

Thanks in advance...

Thanks,
Mk icon_smile.gif
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Sep 06, 2007 11:26 am    Post subject:
Reply with quote

Do you mean add or the column function SUM?
Back to top
View user's profile Send private message
muthukannan

New User


Joined: 03 Aug 2006
Posts: 42
Location: Chennai

PostPosted: Fri Sep 07, 2007 8:51 am    Post subject: Reply to: Reg: Query about null value addition in a sql quer
Reply with quote

Hi,

I have mentioned about SUM only.


Thanks,
Mk icon_smile.gif
Back to top
View user's profile Send private message
Help-Me-Out

New User


Joined: 09 Dec 2006
Posts: 56
Location: Pune

PostPosted: Fri Sep 07, 2007 1:21 pm    Post subject: Reply to: Reg: Query about null value addition in a sql quer
Reply with quote

Hi,

It will give data type or length error. it will never do like this.

Atleast zero should be present in that. icon_razz.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us