sql-formatter-org / sql-formatter

A whitespace formatter for different query languages
https://sql-formatter-org.github.io/sql-formatter/
MIT License
2.23k stars 392 forks source link

Canot format document when '#' character is Found #736

Closed pgmlloyd closed 2 months ago

pgmlloyd commented 2 months ago

Describe the bug Document contains below SQL statement, along with other statements

select prac01, prastr, prainv,
       pramdl, prasr#,
       prara#, coalesce(xcxcol,0)
  from disk.pcrrap
  left join disk.xfrcxp
         on xcxptr = PRAC01
  where PRAC01 <> ' '
    and prasr#=' '
;        

Expected behavior Formatted statement

Actual behavior Error: Unable to format SQL: Error: Parse error: Unexpected "#, " at line 16 column 21

Usage

nene commented 2 months ago

Please read the FAQ.