I have tried to compose an SQL IN clause using python and pandas and using the SQL profiler I find the following is passed from my python program to SQL server but no data is returned - I assume it is generating an internal error because of bad formatting but I can not identify the issue:
declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@P1 nvarchar(22)',N'
SELECT [Date], [Person], [Amount]
FROM [Logs].[dbo].[Results]
WHERE [Date] >= GETDATE()-1 AND [Person] IN @P1',N'(''person1'', ''person2'')'
select @p1
Can anyone help me identify what is wrong?