sqls中的替代变量

2024-06-16 09:26:12 发布

您现在位置:Python中文网/ 问答频道 /正文

在使用SQLDeveloper by oracle时,我似乎被要求替换一些值,因为它要求我“输入一个替换变量”。不过,我可以通过按“确定”来解决这个问题。在

但是在代码中,使用pymmsql从python调用时,它会挂起,因此整个查询都会失败。在

有人知道如何解决这个问题吗?在

顺便说一句,这个问题发生在“度假村”这个词上,所以没有逃逸的问题

示例查询是:

SELECT id
FROM holiday_experience
WHERE company_name IN (' Starwood Hotels',
                       'Starwood Hotels Corp',
                       'Starwood Hotels',
                       'Starwood Hotels (Boston Park Plaza)',
                       'Starwood Hotels Corporation',
                       'Starwood Hotels (Sheraton Parsippany Hotel)',
                       'Starwood Hotels International',
                       'Starwood Hotels Inc',
                       'Starwood Hotels, Inc',
                       'STARWOOD HOTELS & RESORTS INTERNATIONAL',
                       'Starwood Hotels and Resorts, Inc',
                       'Starwood Hotels& Resorts',
                       'Starwood Hotels and Resorts',
                       'Starwood Hotels & Resorts (Formerly Westin Hotels)',
                       'Starwood Hotels & Resorts Asia Pacific',
                       'Starwood Hotels & Resorts, Inc.',
                       'Starwood Hotels and Resorts, Inc.',
                       'Starwood Hotels&Resorts',
                       'Starwood Hotels & Resorts',
                       'Starwood Hotels & Resorts Ltd',
                       'STARWOOD HOTELS AND RESORTS NA',
                       'Starwood Hotels & Resorts, Inc',
                       'Starwood Hotels & Resorts Inc',
                       'Starwood Hotels and Resorts Worldwide Inc.',
                       'Starwood Hotels and Resorts Worldwide, Inc.',
                       'Starwood Hotels & Resorts Worldwide Inc.',
                       'STARWOOD HOTELS & RESORTS WORLDWIDE, INC',
                       'STARWOOD HOTELS & RESORTS WORLDWIDE',
                       'Starwood Hotels & Resorts, Worldwide, Inc',
                       'STARWOOD HOTELS & RESORTS, WORLDWIDE',
                       'Starwood Hotels and Resorts World Wide',
                       'Starwood  Hotels and Resorts Worldwide',
                       'Starwood Hotels & Resorts Worldwide Inc',
                       'Starwood Hotels & Resorts Worldwide (Aquent)',
                       'Starwood Hotels and Resorts Worldwide Inc',
                       'Starwood Hotels and Resorts Worldwide, Inc',
                       'Starwood Hotels & Resorts Worldwide, Inc.',
                       'Starwood Hotels and Resorts Worldwide')

Tags: and代码byworldwideincoraclehotelssqldeveloper