pedestrian via SQLMonster.com
2006-05-18 02:01:10 UTC
I'm using MS SQL Server 2000. I have a simple table (Table1):
Table1:
ID Name PostCode
1 James 12345
2 Mandy 99100
3 John NULL
4 Alex NULL
how to build a query that list all Table1 data replace those with PostCode
NULL with Postcode '00000' ?
Result expected:
ID Name PostCode
1 James 12345
2 Mandy 99100
3 John 00000
4 Alex 00000
Table1:
ID Name PostCode
1 James 12345
2 Mandy 99100
3 John NULL
4 Alex NULL
how to build a query that list all Table1 data replace those with PostCode
NULL with Postcode '00000' ?
Result expected:
ID Name PostCode
1 James 12345
2 Mandy 99100
3 John 00000
4 Alex 00000
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/200605/1
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/200605/1