Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2008, 12:53 AM
Registered User
 
Join Date: Dec 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ssaranam
Default Replace with 0(zero) Urgent

Hi,
My reqiremnent is :
eno ename sal
100 sssss 29000
150 aaaaa 23456
200 eeeee Null
190 wwwww null
888 nnnnn 4444

In the above source I want to replace sal column Null values with 0(zero).
for this i used derived column Replace function:
i wrote expresion as REPLACE("NULL","NULL","0"). it is not working.
it is replacing total sal column with 0 ( zero).

ss
 
Old April 17th, 2008, 01:10 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

UPDATE Table1
SET Sal = 0
WHERE Sal IS NULL


 
Old April 24th, 2008, 06:17 AM
Authorized User
 
Join Date: Jun 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

UPDATE Table1
SET Sal = 0
WHERE Sal IS NULL






Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace In c# jayanth_nadig SQL Language 2 July 3rd, 2006 03:25 AM
replace ' and " with \' and \" Brian Campbell XSLT 4 May 24th, 2006 10:49 AM
replace "." with "/" thelos Excel VBA 1 September 14th, 2005 10:47 AM
replace() Missy_K Javascript 1 January 16th, 2004 11:17 AM
Replace . by , Lukas C# 1 October 24th, 2003 10:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.