﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / plz i need help!!!! / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 18 Jun 2013 19:43:32 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>This looks like a school assignment. I think rather then giving him code we should send him some good tutorials.</description><pubDate>Wed, 30 Jan 2013 19:07:56 GMT</pubDate><dc:creator>Mahmood.BilalB</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>[quote][b]C.K.Shaiju (1/28/2013)[/b][hr]Correct. In the first post he wants NULL and 2nd post 0 or Nothing (NULL). Thought he might be doing something with NULL. That's why I posted that script as a solution for both of his posts.[/quote]Ah!  Got it.</description><pubDate>Tue, 29 Jan 2013 22:16:08 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>Thank societies... and I appreciate your help ;-)</description><pubDate>Tue, 29 Jan 2013 01:13:05 GMT</pubDate><dc:creator>almany_13</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>Correct. In the first post he wants NULL and 2nd post 0 or Nothing (NULL). Thought he might be doing something with NULL. That's why I posted that script as a solution for both of his posts.</description><pubDate>Mon, 28 Jan 2013 23:07:09 GMT</pubDate><dc:creator>C.K.Shaiju</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>[quote][b]C.K.Shaiju (1/28/2013)[/b][hr]Yes Jeff, I had that thing in my mind. But in the first post he wants "result with a null value". I should have post both the scripts :-DThanks Jeff[quote][b]almany_13 (1/27/2013)[/b][hr]i want the entry for adding 2 value but i want show in the third cloumn all result with null value!!need ur help:-)[/quote][/quote]Yet in the post where you offered your solution, you quoted the post where the op finally clarified and said "0 or noting[sic]".  Not sure what wasn't clear about that.</description><pubDate>Mon, 28 Jan 2013 16:45:41 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>Yes Jeff, I had that thing in my mind. But in the first post he wants "result with a null value". I should have post both the scripts :-DThanks Jeff[quote][b]almany_13 (1/27/2013)[/b][hr]i want the entry for adding 2 value but i want show in the third cloumn all result with null value!!need ur help:-)[/quote]</description><pubDate>Mon, 28 Jan 2013 08:34:18 GMT</pubDate><dc:creator>C.K.Shaiju</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>No need for CASE here at all.[code="sql"] SELECT Name,        Total = ISNULL(Salary,0) + ISNULL(Bonuses,0)   FROM dbo.YourTable;[/code]If you insist on ANSI/ISO code, you can replace ISNULL with COALESCE.  I use ISNULL to make sure the datatype stays the same as the first operand and, over millions of rows, is a bit faster than COALESCE.As a note for future posts, please read and heed the article at the first lik in my signature line below.  Thanks.</description><pubDate>Sun, 27 Jan 2013 23:55:34 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>[quote][b]almany_13 (1/27/2013)[/b][hr][img]http://s14.postimage.org/tjv3p1dyp/image.png[/img][/quote]Did not understand the question properly. But can you please try the below script.[code="sql"]SELECT name, (CASE WHEN(salary) &amp;lt;= 0 THEN NULL ELSE salary END) 		   + (CASE WHEN(bonuses) &amp;lt;= 0 THEN NULL ELSE bonuses END) ) as total FROM YourTableName[/code]</description><pubDate>Sun, 27 Jan 2013 23:21:04 GMT</pubDate><dc:creator>C.K.Shaiju</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>[img]http://s14.postimage.org/tjv3p1dyp/image.png[/img]</description><pubDate>Sun, 27 Jan 2013 22:12:06 GMT</pubDate><dc:creator>almany_13</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>[code="sql"]--create a table for some sample dataIF OBJECT_ID('tempdb..#TempTable') IS NOT NULLDROP TABLE #TempTableCREATE TABLE #TempTable (    [ID] INT NOT NULL,    [Col1] INT NULL,    [Col2] INT NULL,    PRIMARY KEY (ID)) --insert random numbers with a few nulls tossed inINSERT INTO #TempTableSELECT 1,ABS(CAST(NEWID() AS BINARY(6))%10)+1,ABS(CAST(NEWID() AS BINARY(6))%10)+1UNIONSELECT 2,ABS(CAST(NEWID() AS BINARY(6))%10)+1,ABS(CAST(NEWID() AS BINARY(6))%10)+1UNIONSELECT 3,NULL,ABS(CAST(NEWID() AS BINARY(6))%10)+1UNIONSELECT 4,ABS(CAST(NEWID() AS BINARY(6))%10)+1,ABS(CAST(NEWID() AS BINARY(6))%10)+1UNIONSELECT 5,ABS(CAST(NEWID() AS BINARY(6))%10)+1,NULLUNIONSELECT 6,ABS(CAST(NEWID() AS BINARY(6))%10)+1,ABS(CAST(NEWID() AS BINARY(6))%10)+1--raw tableSELECT * FROM #TempTable ORDER BY ID--Col1+Col2 = Col3SELECT     ID    ,Col1    ,Col2    ,Col3 = ISNULL(Col1,0) + ISNULL(Col2,0)FROM    #TempTableORDER BY    ID[/code]</description><pubDate>Sun, 27 Jan 2013 20:01:55 GMT</pubDate><dc:creator>Steven Willis</dc:creator></item><item><title>RE: plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>[quote][b]almany_13 (1/27/2013)[/b][hr]i want the entry for adding 2 value but i want show in the third cloumn all result with null value!!need ur help:-)[/quote]Hi...welcome to the site.its a bit difficult to help you....I cant see what you can see....perhaps if you gave us the code for your query and some example data and expected results...we may be able to helpif you are unsure how to provide this...please post back...I assume you are using SQL 2005 ?regards</description><pubDate>Sun, 27 Jan 2013 06:34:43 GMT</pubDate><dc:creator>J Livingston SQL</dc:creator></item><item><title>plz i need help!!!!</title><link>http://www.sqlservercentral.com/Forums/Topic1412115-338-1.aspx</link><description>i want the entry for adding 2 value but i want show in the third cloumn all result with null value!!need ur help:-)</description><pubDate>Sun, 27 Jan 2013 03:49:16 GMT</pubDate><dc:creator>almany_13</dc:creator></item></channel></rss>