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 |
aomar
Starting Member
6 Posts |
Posted - 2008-04-21 : 16:31:59
|
*first issuehow to add a calculated column in a view such that this calculated column will be calculated from the oraginal columnscreate view vw1as select tab.col1,tab.col2 from from taband i want to add a column that contains the result of a comparison between col1 and col2 (col1<col2) such that the values of the column will be true,falsethanx |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2008-04-21 : 16:40:40
|
create view vw1asselect tab.col1, tab.col2, convert(bit,case when col1<col2 then 1 else 0 end)from tab elsasoft.org |
|
|
aomar
Starting Member
6 Posts |
Posted - 2008-04-21 : 17:36:35
|
thanx alot |
|
|
|
|
|