C#窗口应用程序SQL Server WindowForm [英] C# window application sql server windowform

查看:117
本文介绍了C#窗口应用程序SQL Server WindowForm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个过程或游标来完成以下任务.

1)在单击C#中的按钮后,我想为每条员工记录插入新行,使他们的基本工资增加3%.

2)如果任何员工记录由于工资变动而有多行,则使用最新记录进行增值.

3)如何在C#

i want to create a procedure or cursor for doing the following task.

1) i want to insert a new row for each employee record after incremented their basic pay by 3% in a single click of button in C#.

2)if any employee record has multiple rows because of salary changes, then used latest record for increment.

3)how to use this procedure and cursor in C#

推荐答案



您可以将光标用于所需的输出.
首先创建游标以获取所有员工.
要获取最新记录,请按日期使用排名前1的顺序,然后使用该数据递增.
以下链接将向您展示如何使用光标.

http://www.dotnet-tricks.com/Tutorial/sqlserver/4L7I050512-SQL-Server-Basics-of-Cursors.html [ http://sqlusa.com/bestpractices2005/doublecursor/ [ http://www.kodyaz.com/articles/cursor.aspx [
Hi,

You can user the cursor for your desired output.
first create cursor to fetch all your employee.
to fetch the latest record use top 1 order by date and use that data to increment.
The following link will show you how to use cursor.

http://www.dotnet-tricks.com/Tutorial/sqlserver/4L7I050512-SQL-Server-Basics-of-Cursors.html[^]
http://sqlusa.com/bestpractices2005/doublecursor/[^]
http://www.kodyaz.com/articles/cursor.aspx[^]

Thanks,
Viprat


Meusam说过Ri8ly,这是看书的基本知识
Ri8ly said by Meusam, read books this is the basics


这篇关于C#窗口应用程序SQL Server WindowForm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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