-
Notifications
You must be signed in to change notification settings - Fork 713
Closed
Description
If there is no space between comments and keyword, the output causes a syntax error. Here's an example:
import sqlparse
sql='''select * from table1--this is a comment
inner join table2 on table1.id = table2.id--this is a comment
where table1.a=1'''
sqlparse.format(sql,strip_comments=True)
This gives the following as output:
select * from table1inner join table2 on table1.id = table2.idwhere table1.a=1