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 |
|
majawar
Starting Member
1 Post |
Posted - 2007-07-23 : 05:47:32
|
| Dear All;i want to use a calculated field in where clause but this does'nt works: e.g.;select (colA + colB) as calcFieldfrom tblwhere calcField > 100what is the right way to do it, as i m getting error;it works like :select (colA + colB) as calcFieldfrom tblwhere (colA + colB) > 100but i m using a complex query as i m getting value from a function and then i hav to use that in where clause as well ;Thanx in advance,--Muhammad Zeeshan |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-07-23 : 05:50:43
|
you can also use a derived tableSELECT calcFieldFROM( SELECT (colA + colB) AS calcField FROM tbl) dWHERE calcField > 100 KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|