Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
yguyon
Starting Member
11 Posts |
Posted - 2015-01-27 : 15:23:30
|
I would like to populate a column of a table based from 2 other columnIf Column A is greater then column B then column C should be 1if column A is less then column B then column c shoulbe be 0Column A and B are dates field.I'm trying to figure out how to do this in a store procedure. |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2015-01-27 : 15:39:30
|
udpate tableset columnc = case when columna > columnb then 1 else 0 end |
|
|
|
|
|