DapperLib / DapperLib/Dapper

parameter-list is not working for where in clause for teradata

Open
#1,142 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

sql = "SELECT acct_nbr, Stor_Nm , Stor_Phys_Addrs_Lne1 , Stor_Phys_Addrs_Lne2, Stor_Phys_Addrs_Lne3 , Stor_Phys_Addrs_Zip, Stor_Cntct_Phn_Nbr, Cust_Lat , Cust_Long FROM e1dw_mview.lookup_store WHERE acct_nbr IN @idList;";

var emailCaptures = con.Query(sql, new { idList= new[] { 024399, 009150 } }).ToList();

It always giving error

**`

- [Teradata Database] [3939] There is a mismatch between the number of
parameters specified and the number of parameters required

`**

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Teradata query with Dapper, the IN @idList parameter, and the sample integer array. Investigate how parameter-list expansion handles this provider and verify the fix against the reported parameter-count error, ideally with a Teradata-focused regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.