小编San*_*dra的帖子

使用左连接选择一对多关系中的第一条记录

我正在尝试使用左连接来连接两个表.结果集必须只包含"右"连接表中的第一条记录.

可以说我有两张表A和B如下;

表"A"

code | emp_no

101  | 12222
102  | 23333
103  | 34444
104  | 45555
105  | 56666
Run Code Online (Sandbox Code Playgroud)

表"B"

code | city       | county
101  | Glen Oaks  | Queens
101  | Astoria    | Queens
101  | Flushing   | Queens
102  | Ridgewood  | Brooklyn
103  | Bayside    | New York
Run Code Online (Sandbox Code Playgroud)

预期产出:

code | emp_no | city      | county
101  | 12222  | Glen Oaks | Queens
102  | 23333  | Ridgewood | Brooklyn
103  | 34444 …
Run Code Online (Sandbox Code Playgroud)

sql left-join

42
推荐指数
5
解决办法
7万
查看次数

由于pom.xml中的错误,无法使用Maven运行构建

我正在尝试在Eclipse中构建一个新的Maven项目.在我的pom.xml中,我收到了一个错误

在这一行发现多个注释: - 缺少工件maven-plugins:maven-findbugs-plugin:plugin:1.3.1 - 缺少工件maven-plugins:maven-cobertura-plugin:plugin:1.3

这是我在pom.xml中的"cobertura"的依赖项代码:

   <dependency>
        <groupId>maven-plugins</groupId>
        <artifactId>maven-cobertura-plugin</artifactId>
        <version>1.3</version>
        <type>plugin</type>
    </dependency>
Run Code Online (Sandbox Code Playgroud)

我尝试添加如下所示的存储库,但仍然无法正常工作.

  <repositories>
    <repository>
        <id>repository.maven-plugins.sourceforge.net</id>
        <name>maven plug-in repository</name>
        <url>http://maven-plugins.sourceforge.net/repository</url>
    </repository>
    <repository>
        <id>repository.ibiblio.org-maven</id>
        <name>ibiblio repository</name>
        <url>http://www.ibiblio.org/maven</url>
    </repository>
</repositories>
Run Code Online (Sandbox Code Playgroud)

链接到Maven插件
http://maven-plugins.sourceforge.net/maven-findbugs-plugin/announcements/announcement-1.3.1.txt

http://maven-plugins.sourceforge.net/maven-cobertura-plugin/announcements/announcement-1.3.txt

我不想为这些插件进行手动安装.我需要通过在pom.xml中声明它们来自动安装它们

请帮忙.

谢谢

maven-plugin pom.xml maven

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

left-join ×1

maven ×1

maven-plugin ×1

pom.xml ×1

sql ×1