高级SQL查询 [英] advanced sql query
问题描述
我有两个表我想要一个查询来编译两个表的列,如下所示
tabel a
extnam 金额
extnam amount
amir 10
amir 10
amir 20
amir 20
maged 13
maged 13
noha 12
noha 12
alie 43
alie 43
tabel b
extnam purch
extnam purch
amir 40
amir 40
amir 20
amir 20
maged 20
maged 20
我读过这个主题,无法执行查询
stackoverflow
sql result want
sql result want
extnam 量      purch
extnam amount purch
amir 30              60
amir 30 60
maged 13                20
maged 13 20
noha 12
noha 12
alie 43
alie 43
推荐答案
Monemas
Monemas
最了解这一点的人在SQL Transact论坛中。如果您有SQL transact,您可以在dataadapter中使用它来获取连接表。
The persons who know the most of this are in the SQL Transact forum. If you have the SQL transact you can use that in a dataadapter to get a joined table.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=transactsql
The VB part in your question is something which in my perception you have done already many times.
这篇关于高级SQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!