Skip to content

Format Query within Column List #170

@kfordaccela

Description

@kfordaccela

Describe the bug

When formatting a query that has a query within the column list

To Reproduce

python
.from sql_formatter.core import format_sql

print( format_sql( "SELECT Column1, Column2, (SELECT column3 from SubTable) Column 4 FROM TABLE" ) )

output:
SELECT_column1,
_______column2,
_______(SELECT_column3
_FROM___subtable)_column4
FROM___table

Expected behavior

SELECT
_____column1,
_____column2,
_____(
__________SELECT
_______________column3
__________FROM__subtable
_____)_column4
FROM table

Screenshots

Sorry for "_" but the 'code' in the editor was dropping formatting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions