如果我在数据库上运行SQL查询,我会得到结果。
select description from ml.step0
'Akshay Godase At-Post Diskal Tal-Khatav, Dist- Satara Pin 44665'
'Amar Godase At-Post Pune, Tal-Haveli, Dist_pune pin- 43354'
如果我使用带有pyodbc
的python代码运行相同的查询,则会得到结果,但结果相同,但是获取数据像
get_description_query = "select description from ml.step0"
desc_data = self.db_connect_obj.sql_db.execute(get_description_query)
for each_desc in desc_data:
print(each_data)
改组结果是:-
'Amar Godase At-Post Pune, Tal-Haveli, Dist_pune pin- 43354'
'Akshay Godase At-Post Diskal Tal-Khatav, Dist- Satara Pin 44665'
我不了解如何解决上述改组问题。为什么会发生?