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 |
rajnidas
Yak Posting Veteran
97 Posts |
Posted - 2014-08-05 : 01:23:59
|
hi all , i need to addition to column which i given below.SELECT CASE WHEN UPPER(f.newact) = 'N' THEN c.numberofleavesnew WHEN UPPER(f.newact) = 'R' THEN c.numberofleaves END AS Number_of_Leaves , f.STRT_SER FROM finacle_upload_detail AS f INNER JOIN cheque_master AS c ON c.schemecode = f.schcd.getting result.----------------------numberofleaves STRT_SER 50 12300 25 45200 30 14522 i need to addition this two column kindly need helpThanks\Rajnidas |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-08-05 : 03:27:43
|
[code]select *, numberofleaves + STRT_SERfrom(SELECTCASEWHEN UPPER(f.newact) = 'N'THEN c.numberofleavesnewWHEN UPPER(f.newact) = 'R'THEN c.numberofleavesEND AS Number_of_Leaves, f.STRT_SERFROM finacle_upload_detail AS f INNER JOIN cheque_master AS c ON c.schemecode = f.schcd.) d[/code] KH[spoiler]Time is always against us[/spoiler] |
|
|
rajnidas
Yak Posting Veteran
97 Posts |
Posted - 2014-08-05 : 04:39:36
|
thanks sir its working fine,Thanks & regardsRajnidas |
|
|
|
|
|