计算父母和子女的佣金 [英] calculate commission for parent and child

查看:94
本文介绍了计算父母和子女的佣金的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,我创建一个表如下



hi friends i create one table as below

if 3 childs in one parent then we have to give the comission 500 and after for every child comission increase to 250(500 + 250 = 750)







CREATE TABLE [dbo]。[regi](



[id] [int] IDENTITY(1,1)NOT NULL,

[sponserid] [varchar](50)NULL,

[introducername] [ varchar](50)NULL,

[placementunderid] [varchar](50)NULL,

[name] [varchar](50)NULL,

[so] [varchar](50)NULL,

[position] [int] NOT NULL,

[性别] [int] NOT NULL,

[职业] [varchar](50)NULL,

[dob] [varchar](50)NULL,

[addr] [varchar](200)NULL,

[area] [varchar](50) NULL,

[city] [varchar](50)NULL,

[区] [varchar](50)NULL,

[状态] [varchar](50)NULL,

[密码] [varchar](50)NULL,

[email] [varchar](50)NULL,

[固定电话] [varchar](50)空,

[mobileno] [varchar](50)空,

[pwd] [varchar]( 50)NULL,

[pin] [varchar](50)NULL,

[nominee] [varchar](50)NULL,

[关系] [varchar](50)NULL,

[年龄] [varchar](50)NULL,

[bankpayeename] [varchar](50)NULL,

[accno] [varchar](50)NULL,

[bankname] [varchar](50)NULL,

[branch] [varchar ](50)NULL,

[ifsc] [varchar](50)NULL,

[createddate] [datetime] NULL)ON [PRIMARY] GO SET ANSI_PADDIN G OFF GO





1.在此表中,sponserid是表的父级。

2。 name是父级的子级。

3.位置表示左右。

4.此条件是父母必须有2个孩子(仅限**左右)。

5.对于第一位父母必须离开+右+左(或)左+右+然后在每个孩子添加250 rs
$ b $后为父母计算为500 rs b

任何人都可以帮我编写左右位数的代码并计算特定孩子的卢比。

==




CREATE TABLE [dbo].[regi](

[id] [int] IDENTITY(1,1) NOT NULL,
[sponserid] [varchar](50) NULL,
[introducername] [varchar](50) NULL,
[placedunderid] [varchar](50) NULL,
[name] [varchar](50) NULL,
[so] [varchar](50) NULL,
[position] [int] NOT NULL,
[gender] [int] NOT NULL,
[occupation] [varchar](50) NULL,
[dob] [varchar](50) NULL,
[addr] [varchar](200) NULL,
[area] [varchar](50) NULL,
[city] [varchar](50) NULL,
[district] [varchar](50) NULL,
[state] [varchar](50) NULL,
[pincode] [varchar](50) NULL,
[email] [varchar](50) NULL,
[landline] [varchar](50) NULL,
[mobileno] [varchar](50) NULL,
[pwd] [varchar](50) NULL,
[pin] [varchar](50) NULL,
[nominee] [varchar](50) NULL,
[relation] [varchar](50) NULL,
[age] [varchar](50) NULL,
[bankpayeename] [varchar](50) NULL,
[accno] [varchar](50) NULL,
[bankname] [varchar](50) NULL,
[branch] [varchar](50) NULL,
[ifsc] [varchar](50) NULL,
[createddate] [datetime] NULL) ON [PRIMARY]GO SET ANSI_PADDING OFF GO


1. in this table sponserid is the parent of the table.
2. name is the child of the parent.
3. position indicates left and right.
4. here condition is parent must have 2 childs (**left and right only ).
5. For the first parent have to left + right+ left (or) left +right + right then it calculate to 500 rs for the parent after every child add 250 rs

Can any one help me to write the code for count left and right position and calculate rupees for particular child.
==

推荐答案

我们不做你的作业:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!



如果遇到具体问题,请询问相关问题,我们会尽力提供帮助。但我们不打算为你做这一切!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


这篇关于计算父母和子女的佣金的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆