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 |
|
ranga.402
Starting Member
1 Post |
Posted - 2010-12-07 : 00:25:53
|
| my syntax is like that. Declare @temp table(SlNo int identity(1,1) not null,Debit int null,Credit int null,Balance int null) insert @temp(Debit,Credit) (select CurrentDebit,CurrentCredit from Account) the temp table contained this data slno debit crdit Balance------+------+----------1 | 10 | 0 null2 | 0 | 40 null3 | 50 | 0 null4 | 0 | 10 null5 | 0 | 10 null the out put will be come like thisslno debit crdit Balance------+------+----------1 | 10 | 0 102 | 0 | 40 -303 | 50 | 0 204 | 0 | 10 -105 | 0 | 10 0 now how i can write quary for thisThank's in advance |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
|
|
|
|
|