本文介绍了基于场值的条件连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,这个问题的答案在我的脑子里,可能在座垫之间,但我无法取笑它。所以我只想问。

Okay, the answer to this question is in my brain somewhere, probably between the seat cushions, but I can't tease it out. So I'll just ask.

我有两张桌子,Case和Court。在这两个表格中我都有以下字段:

I have two tables, Case and Court. In the both tables I have these fields:

CourtLevel

CourtLevel

CourtNumber

CourtNumber

如果Case表中的County值为"Justice",我想使用所有三个字段连接表。否则,我想只在县和CourtLevel上加入它们。 

If the County value in the Case table is "Justice", I want to join the tables using all three fields. Otherwise, I want to join them only on County and CourtLevel. 

条件连接在SQL中看起来如何? 

How does that conditional join look in SQL? 

tod




推荐答案

我认为您可能需要两个单独的查询(以使其更简单)。

I think you may need two separate queries (to make it simpler).

我的2美分......

Just my 2 cents...


这篇关于基于场值的条件连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 02:22