复杂查询

扫码查看
本文介绍了复杂查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多数民众赞成我的情况:

我有三张桌子:

1.主桌: tblDB_Daten

菲尔兹:[ID],[标题],[发布商位置],[发布商名称],[ISBN]

2.包含查询信息的表格: tblMark_PV

字段:[ISBN],[PubLocSingle],[PubLocCombin],[PubName]

3.查询结果表: tblDB_PV

字段:[ID_Daten],[PV]

结果是结果表中的字段[tblDB_PV]。[PV]。应填写文字PV。如果

1.字段[tblDB_Daten]。主表中的[ISBN]包含[tblMark_PV]。[ISBN]来自query-table

2。字段[tblDB_Daten]。主表中的[PublisherLocation]包含[tblMark_PV]。[PubLocSingle]来自query-table

另外

字段[tblDB_Daten]。主表中的[PublisherName]包含[tblMark_PV]。[PubName]来自query-table


我已经尝试了几天来生成一个有效的SQL代码(使用UPDATE和LEFT JOIN)但失败了。所以我现在要求一些帮助。

Thats my situation:
I have three tables:
1. Main table: tblDB_Daten
Fields: [ID], [Title], [PublisherLocation], [PublisherName], [ISBN]
2. Table containing the information for the query: tblMark_PV
Fields: [ISBN], [PubLocSingle], [PubLocCombin], [PubName]
3. Table for the result of query: tblDB_PV
Fields: [ID_Daten], [PV]

As a result the fields [tblDB_PV].[PV] in the "result-table" should be filled with the text "PV" in case
1. Field [tblDB_Daten].[ISBN] in Main-table contains [tblMark_PV].[ISBN] from the "query-table"
2. Field [tblDB_Daten].[PublisherLocation] in Main-table contains [tblMark_PV].[PubLocSingle] from the "query-table"
3. Field [tblDB_Daten].[PublisherLocation] in Main-table contains [tblMark_PV].[PubLocCombin] from the "query-table"
and additionally
Field [tblDB_Daten].[PublisherName] in Main-table contains [tblMark_PV].[PubName] from the "query-table"

I have tried for days to generate a working SQL-Code (using UPDATE and LEFT JOIN) but failed. So I am asking for some help now.

推荐答案



展开 | 选择 | Wrap | 行号


这篇关于复杂查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 09:14
查看更多