I'm trying to use python to query oracle database with SQLAlchemy. I am able to get data with a normal query, but it always returns an empty DataFrame when the where clause contains quote signs, such as condition below: A in ('a','b','c','d').
engine = create_engine(...) query = '''select * from table where ( A in (:A_Value) and BIN (:B_Value))''' df= pd.read_sql_query(query , con=engine, params = {"A_Value": A_value, "B_Value" : B_value}) A_value is the value of a dataframe. I tried to form a comma-separated string with quote as A_value = " 'a', 'b', 'c', 'd' "
I am wondering where done wrongly?