Querying to sql connection through Python, but receiving below error. However the same code worked when connecting via excel > to azure sql
Code:
DF=pd.read_sql('SELECT CONVERT(VARCHAR(MAX), candidate,2) AS candidate,CONVERT(datetime,'01-'+Month,23) AS Month FROM [workspace].[abctbldata]',conn)
DF
OUTPUT: ERROR:
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for
octal integers