1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use gshis
select * from v_gscorpprofile --应收合约单位列表

select * from gsProfileCA where PaidAmt ='222159'
select * from gsProfileCA where ProfileID ='222159' and transid ='3862159'--协议单位,交易号码
--UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值

update gsProfileCA SET PaidAmt='348',Amount='348',validbalance='-348' where ProfileID ='222159' and transid ='3862159'


SELECT ChargeAmt,DebtAmount,* FROM [gshis].[dbo].[gsProfile] where ProfileID ='222159'
--select ChargeAmt,DebtAmount, * from v_gscorpprofile where ProfileID='222159'

update [gshis].[dbo].[gsProfile] SET DebtAmount ='13862.50',ChargeAmt='0'where ProfileID='222159'


--修改租赁门票销售数据

SELECT * FROM [gsticket].[dbo].[gssaletkdetail] where saleno ='GSSA027700003686'
SELECT * FROM [gsticket].[dbo].[gssaletkdetail] where saleno ='GSSA527000003761'
--UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值
UPDATE [gsticket].[dbo].[gssaletkdetail] SET price='58',amt='58',factamt='58',oriprice='58',tktype='991022' where saleno ='GSSA027700003686'--19.9变成58


SELECT * FROM [gsticket].[dbo].[gssaletkhead] where saleno='GSSA027700003686'--修改租赁门票销售合计
UPDATE [gsticket].[dbo].[gssaletkhead] SET sumamt='348',factamt='348',pay_amt='348' where saleno ='GSSA027700003686'
1
2
3
4
5
6
7
8
9
--修改租赁门票销售数据

SELECT * FROM [gsticket].[dbo].[gssaletkdetail] where saleno ='GSSA915700003597'
--UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值
UPDATE [gsticket].[dbo].[gssaletkdetail] SET price='19.9',amt='19.9',factamt='19.9',oriprice='19.9' where saleno ='GSSA915700003597'


SELECT * FROM [gsticket].[dbo].[gssaletkhead] where saleno='GSSA915700003597'
UPDATE [gsticket].[dbo].[gssaletkhead] SET sumamt='59.7',factamt='59.7',pay_amt='59.7' where saleno ='GSSA915700003597'