This is a discussion on Using arrays in stored procedures within the Database Support forums, part of the Web Development category; i want to call a stored procedure sending array of integers as parameter now in stored procedure i want to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| i want to call a stored procedure sending array of integers as parameter now in stored procedure i want to execute Code: select * from Products where Prod_Code IN (sent array) means "sent array" stores values i want to check in query please help |
|
#2
| |||
| |||
| Send them as a string of comma seperated values instead of an array. Then, in your sp, do this: Code: declare @sql varchar(1000) Set @sql = 'Select * From Products Where Prod_Code IN (' + @values + ')' exec(@sql) Where @values is your parameter. |
|
#3
| |||
| |||
| try out the following code this thing will definitely work out: declare @sql varchar(1000) Set @sql = 'Select * From Products Where Prod_Code IN (' + @values + ')' exec(@sql) |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to delete all stored procedures in a Database | oxygen | Database Support | 1 | 03-05-2008 01:35 AM |
| NET Code generators for C# and SQL Stored Procedures | verrock_po | ASP and ASP.NET Programming | 1 | 12-05-2007 11:22 PM |
| Using arrays in stored procedures | oxygen | Database Support | 1 | 11-26-2007 07:01 AM |
| SQL Server Undocumented Stored Procedures | a.deeban | Database Support | 3 | 09-04-2007 02:31 AM |
| Executing SQL Server Stored Procedures With PHP - Executing stored procedures | Jeyaseelansarc | PHP Programming | 1 | 07-18-2007 11:23 PM |
Our Partners |