Hi All
I am new to python coding.
please can one look into code. its not giving any results or throwing error. Any issue in code.
thanks
I am new to python coding.
please can one look into code. its not giving any results or throwing error. Any issue in code.
1 2 3 4 5 6 |
location = r "C:\Users\URIDI\Desktop\CSV PARSING FILES" def getdb_data(_input): fetch_query = """SELECT top 100000 TRAN_STMT_DESC,sum(trans.tran_amt) as tran_amt,count(*) as tran_cnt from facttable""" result = curs.execute(fetch_query) with open (os.path.join(location, f 'filename_{index}.csv' ), 'w' ) as writer: writer.writerows(result) |