Menu

#78 Query builder: do not auto alias fields in (derived table) subqueries

2013.02
closed
nobody
evol (20)
2013-03-02
2012-09-28
PAscal
No

Query builder generates this kind of SQL when using derived table subqueries:

SELECT *
FROM
SCHEMA.TABLE,
( SELECT
bb.FIELD1 AS TABLESUB_FIELD1,
bb.FIELD2 AS TABLESUB_FIELD2
FROM SCHEMA.TABLESUB bb
) SUBQUERY_1

AS TABLESUB_FIELDx should not be added when auto-alias preference is OFF

Discussion

  • PAscal

    PAscal - 2012-12-03
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -Query builder generates this kind of SQLE when using derived table subqueries:
    +Query builder generates this kind of SQL when using derived table subqueries:
    
     SELECT *
     FROM
    @@ -9,4 +9,4 @@
            FROM SCHEMA.TABLESUB bb 
          ) SUBQUERY_1
    
    -AS TABLE_FIELDx should not be added when auto-alias preference is OFF
    +AS TABLESUB_FIELDx should not be added when auto-alias preference is OFF
    
    • status: open --> accepted
     
  • PAscal

    PAscal - 2013-03-02
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB