Top "Connect-by" questions

A hierarchical query clause in Oracle.

Why does CONNECT BY LEVEL on a table return extra rows?

Using CONNECT BY LEVEL seems to return too many rows when performed on a table. What is the logic behind …

sql oracle connect-by
What is the equivalent PostgreSQL syntax to Oracle's CONNECT BY ... START WITH?

In Oracle, if I have a table defined as … CREATE TABLE taxonomy ( key NUMBER(11) NOT NULL CONSTRAINT taxPkey PRIMARY KEY, …

sql oracle postgresql recursive-query connect-by
Oracle 10g PL/SQL Connect By Prior returning Child and Parent on same row

Table1: Child Parent a Bob Chris 2 Chris Kate 1 Shane Lana 3 Nala Bob 4 Table2: b Talent 1 'something' 2 'nothing' 3 'something' 4 'nothing' SELECT …

oracle parent-child hierarchical-data connect-by
SQL Server Equivalent of Oracle 'CONNECT BY PRIOR', and 'ORDER SIBLINGS BY'

I've got this Oracle code structure I'm trying to convert to SQL Server 2008 (Note: I have used generic names, enclosed …

sql-server oracle recursive-query siblings connect-by
Mixing together Connect by, inner join and sum with Oracle

I need help with a oracle query. Here is my setup: I have 2 tables called respectively "tasks" and "timesheets". The "…

oracle connect-by
Connect by clause to get the top of hierarchy

I am facing an issue while using the CONNECT BY clause in Oracle for finding hierarchical data. Let me give …

oracle connect-by
Tree structure in sql in Oracle.How to show tree,child nodes and parent nodes in SQL Oracle

I would like to show a tree structure in SQL with child nodes and parent nodes. I have a table …

sql oracle hierarchical-data recursive-query connect-by
Does PostgreSQL have a pseudo-column like "LEVEL" in Oracle?

Does PostgreSQL have a pseudo-column like "LEVEL" in Oracle? If not, then how can we create a column similar to "…

oracle postgresql connect-by hierarchical-query recursive-cte
PostgreSQL - migrate a query with 'start with' and 'connect by' in oracle

I have the following query in oracle. I want to convert it to PostgreSQL form. Could someone help me out …

oracle postgresql connect-by
oracle connect by multiple parents

I am facing an issue using connect by. I have a query through which I retrieve a few columns including …

oracle connect-by