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 |
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-04-05 : 13:17:19
|
| How could I write this in SQLParameters@CustCode@CustAmountFetch CompanyRate,CompExpense,CompTax,Brokrage from MasterSettingTable '--Will return ratio(%)Fetch CustName,BossCode from CustMast where CustCode = @CustCode@CustName=CustName@BossCode=Bosscode '--Something like thisFetch BossName,BossType from BossMast Where BossCode = @BossCodeCalculate Brokragedim Crate ,CExp,CTax, CompR, Commcrate=(@CustAmount* CompanyRate)/100CExp=(crate*CompExpense)/100CTax =(crate*CompTax)/100CompR= crate - (CExp+CTax) '--Final Rate after deduction of Expense and Taxcomm = (compR * Brokrage)/100Insert into BrokTable(BossCode,CustCode,CustName,Amount,Expense,Tax,MainAmt,Commission)values(@BossCode,@CustCode,@CustName,@CustAmount,CExp,CTax,CompR,comm)VB6/ASP.NET------------------------http://www.nehasoftec.com |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-05 : 13:29:23
|
something likeSELECT @CustName=CustName,@BossCode=Bosscode from CustMast where CustCode = @CustCodeSELECT BossName,BossType from BossMast Where BossCode = @BossCode... I'm not sure where crate etc comes from but above will give u a start------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
ravininave
Posting Yak Master
111 Posts |
Posted - 2010-04-05 : 14:31:41
|
quote: Originally posted by visakh16 something likeSELECT @CustName=CustName,@BossCode=Bosscode from CustMast where CustCode = @CustCodeSELECT BossName,BossType from BossMast Where BossCode = @BossCode... I'm not sure where crate etc comes from but above will give u a start------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Thanx for hint. I got itVB6/ASP.NET------------------------http://www.nehasoftec.com |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-05 : 23:59:37
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|