Is there an example on how to use the WHERE field IN clause?
See original GitHub issueHi Patrik,
I’m trying to perform a simple select query as below:
select * from user_table where id in (@id)
I specify the id parameter as a string ‘1,2,3’, but somehow SQL server fails to Convert this from nvarchar to int. I am relying on .input() function’s capability of assigning a type, when it is unspecified.
However, when I do a query from SQL Server, the query select * from user_table where id in (1,2,3) works well.
An example on how to use the WHERE field IN clause would be very useful.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:19 (2 by maintainers)
Top Results From Across the Web
How To Use WHERE Clauses in SQL - DigitalOcean
It will return the name and wins values from any row whose wins column value is equal to 1 : SELECT name, wins....
Read more >How to Write a WHERE Clause in SQL - LearnSQL.com
This article covers how to use the SQL WHERE clause in detail, with practical examples using sample data sets.
Read more >SQL WHERE IN | NOT IN - Dofactory
WHERE IN returns values that match values in a list. This list is either hardcoded or generated by a subquery. WHERE IN is...
Read more >SQL WHERE Clause - W3Schools
The SQL WHERE Clause The WHERE clause is used to filter records. It is used to extract only those records that fulfill a...
Read more >SQL: WHERE Clause - TechOnTheNet
This SQL tutorial explains how to use the SQL WHERE clause with syntax and examples. ... and apply conditions in a SELECT, INSERT,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rohithshenoyg , you could do a
reduceon your array to construct the SQL string. Something like:Array.join is much simpler there: