Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6966
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us