I have defined my sql statement as follows ( note the line breaks)
def getTankSystemIds():
sql='select tt.TankSystemId,ts.sitecode,tt.productid ' \
'from [dbo].[TankSystems] tt' \
'left join [dbo].sites ts on tt.siteid=ts.siteid where ts.companyid=8' \
'and ProductId in (10,4,2,3,11,4)'
cursor = connectDB()
cursor.execute(sql)
records = cursor.fetchall()
When calling this method, I get following error. I changed single quote to " and ''',""" but all gave same error What Im doing wrong here? I tried providing the sql statement in a single long line too. But same error
SyntaxError: Non-ASCII character '\xef' in file /Users/ratha/PycharmProjects/Processor/Utilities/DbConnector.py on line 86, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details