Click here to Skip to main content
15,905,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to select a some data in my table.this is my column in table
seq int,
Value decimal,
Change value decimal,

seq Value Change value
1 20 0.00
2 30 0.00
3 40 0.00
4 50 0.00
5 60 62.00


I want to select Change value column != 0.00 and value column in like flowing table.

seq ALLValue
1 20
2 30
3 40
4 50
5 62 (remove 60 and add change value column 62/seq number can't be duplicate)

How to solve this problem Any one can help me??
Posted
Updated 24-Nov-13 20:11pm
v2

SQL
select 
       Seq

      , CASE
          WHEN [Change Value] = 0 THEN [Value]
          ELSE [Change Value]
       END AS [ALL Value]

FROM dbo.YourTable
 
Share this answer
 
Comments
[no name] 25-Nov-13 2:26am    
Thanx a lot dear

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900