Using SQL Server 2000
ID Column1 column2
001 050 100
002 000 200
003 100 000
004 010 000
005 000 000
I want to display only values from column1 and column2.
Tried Query
Select id, Column1, Column2 where column1 <> '000' and column2 <> '000'
-- Nothing data's displayed
Select id, Column1, Column2 where column1 <> '000' or column2 <> '000'
-- data's are displayed below
ID column1
001 050
003 100
004 010
Expected Output
ID column1 column2
001 050 100
002 200
003 100
004 010
How to make a query for the above condition, need Query Help
If I understand correct, you want to select all rows where either Column1 or Column2 has a value different from
000and for result rows change000to empty string.