landv / landv.github.io

landv-blogs
https://landv.cn
2 stars 0 forks source link

捷信达应收合约单位,租赁门票销售修改SQL #55

Open landv opened 1 year ago

landv commented 1 year ago
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'