You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to query a table where the ID's are in a list of select id's. I've tried passing this bind variable as both a list and tuple but nothing works. This issue also duplicates #98 but his solution doesn't work for me.
Here's what I tried doing: cust_ids = list(abc_ids.customerId.unique())
also tried: cust_ids = tuple(list(abc_ids.customerId.unique()))
%%sql SELECT * FROM [DM].[dbo].[Vw_Application] va WHERE va.CustomerId IN :cust_ids
I get the error: (pyodbc.ProgrammingError) ("A TVP's rows must be Sequence objects.", 'HY000') [SQL: SELECT * FROM [DM].[dbo].[Vw_Application] va WHERE va.CustomerId in ?] [parameters: ([1056991, 1060609, 1009983, 1010940, 1024749, 1042552, 1043334, 1045169, 1049227, 1050065, 1055142, 1055702, 1056315, 1056459, 1056739, 1056921, 10570 ... (99236 characters truncated) ... 95450, 995908, 996126, 996263, 996669, 996903, 996980, 997027, 997170, 997326, 997481, 997821, 997903, 998114, 998148, 998643, 998736, 999379, 999987],)] (Background on this error at: http://sqlalche.me/e/13/f405)
The text was updated successfully, but these errors were encountered:
I'm trying to query a table where the ID's are in a list of select id's. I've tried passing this bind variable as both a list and tuple but nothing works. This issue also duplicates #98 but his solution doesn't work for me.
Here's what I tried doing:
cust_ids = list(abc_ids.customerId.unique())
also tried:
cust_ids = tuple(list(abc_ids.customerId.unique()))
%%sql SELECT * FROM [DM].[dbo].[Vw_Application] va WHERE va.CustomerId IN :cust_ids
I get the error:
(pyodbc.ProgrammingError) ("A TVP's rows must be Sequence objects.", 'HY000') [SQL: SELECT * FROM [DM].[dbo].[Vw_Application] va WHERE va.CustomerId in ?] [parameters: ([1056991, 1060609, 1009983, 1010940, 1024749, 1042552, 1043334, 1045169, 1049227, 1050065, 1055142, 1055702, 1056315, 1056459, 1056739, 1056921, 10570 ... (99236 characters truncated) ... 95450, 995908, 996126, 996263, 996669, 996903, 996980, 997027, 997170, 997326, 997481, 997821, 997903, 998114, 998148, 998643, 998736, 999379, 999987],)] (Background on this error at: http://sqlalche.me/e/13/f405)
The text was updated successfully, but these errors were encountered: