已结束交易 [英] Closed Transaction

查看:81
本文介绍了已结束交易的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有三张桌子,


客户

NewTransaction

Transactions


客户表有关于客户和交易表的详细信息,有详细的交易总金额和


交易表有分期付款特定交易的金额。


现在,我想要关闭的交易,即NewTransaction.GrossAmount = sum(Transactions.Inst_A mount)


我的查询,

Hi All,
I Have Three Tables,

Customer
NewTransaction
Transactions

The Customer Table Have details about customer and the Transactions table had details of the transactions with gross amount and the

Transactions table had the Installment amounts for a particular transaction.

Now, i want the closed transactions i.e NewTransaction.GrossAmount=sum(Transactions.Inst_A mount)

My Query,

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案




尝试


Abs(nt.amount - ( SELECT sum(t.inst_amount)FROM

交易AS t,newtransaction AS nt,customer AS c WHERE c.id = nt.id and c.id = t.customer_id and nt.tran_id = t。 transaction_id GROUP

BY t.transaction_id))


然后按此栏对获得的记录集进行排序......


第一排将更接近!得到它!


:)
Hi

Try

Abs(nt.amount - (SELECT sum(t.inst_amount) FROM
transactions AS t, newtransaction AS nt, customer AS c WHERE c.id=nt.id and c.id=t.customer_id and nt.tran_id=t.transaction_id GROUP
BY t.transaction_id))

And then sort the obtained recordset by this column...

The first row will be closer! Get it!

:)






尝试


Abs(nt.amount - (SELECT sum(t.inst_amount)FROM

交易AS t,newtransaction AS nt,customer AS c WHERE c.id = nt.id和c.id = t.customer_id和nt.tran_id = t.transaction_id GROUP

BY t.transaction_id))


然后按此列对获得的记录集进行排序......


第一行将更接近!得到它!


:)
Hi

Try

Abs(nt.amount - (SELECT sum(t.inst_amount) FROM
transactions AS t, newtransaction AS nt, customer AS c WHERE c.id=nt.id and c.id=t.customer_id and nt.tran_id=t.transaction_id GROUP
BY t.transaction_id))

And then sort the obtained recordset by this column...

The first row will be closer! Get it!

:)



嗨PEB,

对不起,我没有'告诉你清楚。如果关闭,你的'将返回零。我只想要关闭的交易清单。


Hi PEB,
Sorry yar, I Didn''t get you clear. Your''s will return Zero if its closed. I Want list of the closed transactions only.






尝试


Abs(nt.amount - (SELECT sum(t.inst_amount)FROM

交易AS t,newtransaction AS nt,customer AS c WHERE c.id = nt.id和c.id = t.customer_id和nt.tran_id = t.transaction_id GROUP

BY t.transaction_id))


然后对获得的记录集进行排序这一栏...


第一行将更接近!得到它!


:)
Hi

Try

Abs(nt.amount - (SELECT sum(t.inst_amount) FROM
transactions AS t, newtransaction AS nt, customer AS c WHERE c.id=nt.id and c.id=t.customer_id and nt.tran_id=t.transaction_id GROUP
BY t.transaction_id))

And then sort the obtained recordset by this column...

The first row will be closer! Get it!

:)



嗨PEB,

我能知道是什么我的上述查询有问题吗?


Hi PEB,
Can i know what is the problem with my above query ?


这篇关于已结束交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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