代码如下
import csv
import cx_Oracle
# 建立数据库连接
connection = cx_Oracle.connect(user="wbq", password="Wbq197711..., vRuleType, vRuleName, vTableName, vExportSQL, vCSVFileName=row_data
print('---------------{} 开始导出到...{} 中---------------'.format(vTableName,vCSVFileName))
# 开始写文件
with open(vCSVFileName,'w',newline...='') as outputfile:
output = csv.writer(outputfile, dialect='excel')
# 建立新游标
curcsv=connection.cursor...output.writerow(rowdata)
outputfile.close()
print('---------------{} 完成导出到 {} 中--------------