`
zjnicholas
  • 浏览: 36691 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

db2 with as

DB2 
阅读更多
WITH
    RPL (org_parent_id, orginfo_id, org_title) AS
    (
        SELECT
            ROOT.org_parent_id,
            ROOT.orginfo_id,
            ROOT.org_title
        FROM
            jt_orgstructtree ROOT
        WHERE
            ROOT.org_parent_id = 'hello'
        UNION ALL
        SELECT
            CHILD.org_parent_id,
            CHILD.orginfo_id,
            CHILD.org_title
        FROM
            RPL PARENT,
            jt_orgstructtree CHILD
        WHERE
            PARENT.orginfo_id = CHILD.org_parent_id
    )
SELECT DISTINCT
    org_parent_id,
    orginfo_id,
    org_title
FROM
    RPL
ORDER BY
    org_parent_id,
    orginfo_id,
    org_title
分享到:
评论

相关推荐

    SQL_WITH_AS实现父子递归查询

    sql 2005中用CTE实现递归的很好很易懂很基础的例子讲解。

    DB2 v11.1 DBA Certification Study Guide 2018 pdf

    IBM Db2 11.1 Certification Guide provides you with more than 150 practice questions and answers, simulating real certification examination questions. Each chapter includes an extensive set of ...

    DB2 9 for z/OS

    DB2® 9 for z/OS® is an exciting new version, with many improvements in performance and little regression. DB2 V9 improves availability and security, as well as adds greatly to SQL and XML functions....

    db2认证 000-541,102q

    CREATE VIEW V2 AS SELECT COI1 FROM v1 WITH CASCADED CHECK OPTION CREATE VIEW v3 AS SELECT coll FROM v2 WHERE coll ; Which statement will fail? A. INSERT INTO v2 VALUES (35) B. INSERT INTO v1 VALUES ...

    DB2 getting started

    This book is closely related to the eBook Getting Started with DB2 Express-C; it expands the application development chapters covered in that book. In fact, Chapter 1 and 2 are taken directly from the...

    db2 advance dba

    Although this book was written as a study guide for the new Advanced DBA certification (DB2 Exam number 704), it can also be used as a reference by DBAs as they perform their day-to-day activities.

    DB2 LUW Administration for SAP.pdf

    IBM 培训教程 After completing this course, ...integration with SAP, such as DPF, MDC and deep compression Understand various setup for high available system Be able to perform basic problem analysis

    Squeezing the Most Out of Dynamic SQL with DB2 for z/OS and OS/390

    Squeezing the Most Out of Dynamic SQL with DB2 for z/OS and OS/390

    How to configure ODBC DSN in Client to access DB2 for Windows.

    Then I give a sample how to access remote DB2 database with ODBC by DB Query Analyzer expediently. It’s also applicable to configure ODBC DSN to access remote DB2 for other OS such as Aix, Linux, ...

    DBVIEW,DB数据库查看

    printing DBF databases (Clipper, dBase, Foxpro, Delphi, Visual Foxpro, Db2K...). You can view(form, table) and edit in OEM(DOS) or Windows character sets, create new DBF file, quick view, get ...

    Struts Hibernate Ibatis Spring RAD WID

    -- Familiar with DB2 development tools and products. -- Knowledge in Agile Methodologies (e.g. XP, Scrum, TDD) is a plus -- Unix script programming 有意向的请把简历发到:mengqn82@hotmail.com

    Agile Techniques for Object Databases

    technology such as Oracle or DB2 on the back end. Unfortunately, because of the object/relational mismatch and with a current lack of tool support, your ability to be agile is reduced. As you’ll see ...

    SQL袖珍参考手册(第3版)

    You'll find many examples that address the language's complexity, along with key aspects of SQL used in IBM DB2 Release 9.7, MySQL 5.1, Oracle Database 11g Release 2, PostgreSQL 9.0, and Microsoft ...

    OTL+代码+实例+帮助

    OTL 4.0 supports all versions of Oracle starting with 7.3 (natively via the corresponding version of the OCI), DB2 UDB LUW / zOS (natively via DB2 CLI), MS SQL Server 2005/2008 (natively via SNAC), ...

    UniDAC 7.1.4

    UniDAC can work with such servers as Oracle, Microsoft SQL Server, MySQL, Interbase, Firebird. The UniDAC library is designed to help programmers develop faster and cleaner cross-database ...

    SQLDirect_6.2.0_Full_Source

    with SQL*Net 2.2(+), Microsoft SQL Server, PostgreSQL 7.1(+), Sybase Adaptive Server Enterprise and Adaptive Server Anywhere (through Open Client, which is supported by Anywhere ver.6 as native ...

    linux sqlapi++ gcc-4.4 crack

    is a C++ library for accessing multiple SQL databases Oracle SQL Server DB2 Sybase Informix InterBase SQLBase MySQL PostgreSQL SQLite SQL Anywhere and ODBC It uses native APIs of target DBMS so ...

    浅析常用数据库的自增字段创建方法汇总

    DB2 代码如下:CREATE TABLE T1( id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1 MINVALUE 1 NO MAXVALUE NO CYCLE NO CACHE ORDER ), …); Oracle(需要创建...

    An universal algorithm design of locating fixed length string

    in which functions are also supplied to realize the locating operation, such as the 'LOCATE' function in DB2 or 'POS function in DELPHI. In fact, we may meet with the special string locating, such ...

    PostgreSQL 9 Administration Cookbook

    Simon has worked with enterprise-class database applications for more than 20 years, with prior certifications on Oracle, Teradata and DB2. Simon is responsible for much of the database recovery and ...

Global site tag (gtag.js) - Google Analytics