Python использовать запрос_1 приводит к запросу_2, где условие, поскольку оба запроса будут выполняться на разных серверах SQL
cnxn = pyodbc.connect(driver = '{SQL Server}', host = 'server1', database = 'db1', user = '', password = '', Trusted_Connection = 'yes')
cursor = cnxn.cursor()
cnxn1 = pyodbc.connect(driver = '{SQL Server}', host = 'server2', database = 'db2', user = '', password = '', Trusted_Connection = 'yes')
cursor1 = cnxn1.cursor()
query = "SELECT top(10) Batch_ID FROM [db1].[dbo].[table1];"
cursor.execute(query)
Result = cursor.fetchall()
print (Result)
query1="delete FROM [db2].[dbo].[table2] where Batch_ID in (**Result**);" ###i have use 1st query result in this where condition
cursor.execute(query1)
Result1 = cursor1.fetchall()