User.where('user_id not in (?)', CancelledUser.all.collect(&:id).join(', '))
Above query gives me the following error when there are no cancelled users.
ActiveRecord::StatementInvalid: TinyTds::Error: Conversion failed when converting from a character string to uniqueidentifier.: EXEC sp_executesql N'SELECT [users].* FROM [userss] WHERE (user_id not in (N''''))'
How do i fix this?