Need someone to help me with python code_Declare variables from cursor execution output
₹600-700 INR
完了済み
投稿日: 5年以上前
₹600-700 INR
完了時にお支払い
I am extracting information from MSSQL Database which is in table format. I would like to use the output from Cursor execution to define variables, which I might be needing for further code.
Please find the attachment for Task Details.
For Example, I have data in either of below formats:
('Test_DB', 'C:\\Program Files\\Microsoft SQL Server\\[login to view URL]') ('Test_DB_log', 'C:\\Program Files\\Microsoft SQL Server\\[login to view URL]')
#(or)
[{'LogicalName': 'Test_DB', 'PhysicalName': 'C:\\Program Files\\Microsoft SQL Server\\[login to view URL]'},{'LogicalName': 'Test_DB_log', 'PhysicalName': 'C:\\Program Files\\Microsoft SQL Server\\[login to view URL]'}]
I would like to use information from this data to declare variables, which I would like to use for further set of code, for example:
LogicalName= Testing_DB
PhysicalName= C:\Program Files\Microsoft SQL Server\[login to view URL]
# As the variable names are same for all dictionaries, I would like to add suffix with "_" followed by repetition number,as there could be more than 2 files
LogicalName_1= Testing_Script_Dinesh_log
PhysicalName_1= C:\Program Files\Microsoft SQL Server\[login to view URL]
Revert in-case of any queries, am looking for immediate help who can resolve as soon as possible.
i have lot of experience working with python ,and currently working as data engineer using python.
i have done more than 10 projects in [login to view URL] i have hands on experience in django