我正在python中编程以下sql代码,但不知道哪里出了问题,也不知道为什么会出现此错误:
query='''
SELECT
FIN AS 'LIN',
CUSIP,
Borrower_Name,
Alias,
DS_Maturity,
Spread,
Facility,
Facility_Size,
Log_date
FROM [Main].[FacilityInformation]
WHERE
CUSIP IN ('{}')
OR (
YEAR(DS_Maturity) IN ('{}')
AND (
Borrower_Name IN ('{}')
OR Alias IN ('{}')
)
)
'''
这样尝试:
query='''
SELECT
FIN AS ''LIN'',
CUSIP,
Borrower_Name,
Alias,
DS_Maturity,
Spread,
Facility,
Facility_Size,
Log_date
FROM [Main].[FacilityInformation]
WHERE
CUSIP IN ('{}')
OR (
YEAR(DS_Maturity) IN ('{}')
AND (
Borrower_Name IN ('{}')
OR Alias IN ('{}')
)
)
'''