Does anyone know of a way to bulk update the query of a 'Query Feature Class' using Python? A bunch of geodatabase tables are being renamed and there are a lot of layers of Data Type: Query Feature Class referencing these tables that will have their data sources broken. I have a script that fixes these broken data sources for all our regular Feature Classes but can't find anything that will do the same as 'Change Query' button in the Layer Properties. Not looking forward to manually updating 100s of MXDs. Please help!