473,372 Members | 1,246 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Passing table to MSSQL stored procedure

Hi all,

Any suggestions on the best way to pass a set of values to a stored
procedure that will use them in a query? Specifically, I want to call a
stored procedure from .NET that takes a set of phone numbers and returns a
resultset of records containing these numbers from a table. Is it possible
to pass a dataset/XML or something that would be interpreted as a table? Or
do I need to pass a string and convert it to a temporary table in the stored
procedure? Or...?

TIA,

John
Jul 21 '05 #1
2 2492
Arrays and Lists in SQL Server
http://www.sommarskog.se/arrays-in-sql.html
AMB
"John Spiegel" wrote:
Hi all,

Any suggestions on the best way to pass a set of values to a stored
procedure that will use them in a query? Specifically, I want to call a
stored procedure from .NET that takes a set of phone numbers and returns a
resultset of records containing these numbers from a table. Is it possible
to pass a dataset/XML or something that would be interpreted as a table? Or
do I need to pass a string and convert it to a temporary table in the stored
procedure? Or...?

TIA,

John

Jul 21 '05 #2
Thanks, Alejandro. Exactly the kind of stuff I was wondering.

- John
"Alejandro Mesa" <Al***********@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Arrays and Lists in SQL Server
http://www.sommarskog.se/arrays-in-sql.html
AMB
"John Spiegel" wrote:
Hi all,

Any suggestions on the best way to pass a set of values to a stored
procedure that will use them in a query? Specifically, I want to call a
stored procedure from .NET that takes a set of phone numbers and returns
a
resultset of records containing these numbers from a table. Is it
possible
to pass a dataset/XML or something that would be interpreted as a table?
Or
do I need to pass a string and convert it to a temporary table in the
stored
procedure? Or...?

TIA,

John

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: WGW | last post by:
Though I am a novice to MS SQL server (2000 I believe), I can do almost! everything I need. Maybe not efficiently, but usefully. However, I have a problem -- a complex query problem... I can...
7
by: rickcheney | last post by:
I just changed my Access 2002 database to a SQL Server ADP project. I had a form where the user entered a value into a text box and when a command button on the form was clicked a Report was...
6
by: dharmadam | last post by:
Is it possible to pass a column name or the order of the column name in the DB2 table table function. For example, I want to update the address of a person by passing one of the address column name...
8
by: Yusuf INCEKARA | last post by:
I have a stored procedure : CREATE PROCEDURE STP_GETSTORELIST @RETCUR CURSOR VARYING OUTPUT AS set @RETCUR = CURSOR FORWARD_ONLY STATIC FOR SELECT ID,STORE_NAME FROM T_INF_STORE ORDER BY...
2
by: John Spiegel | last post by:
Hi all, Any suggestions on the best way to pass a set of values to a stored procedure that will use them in a query? Specifically, I want to call a stored procedure from .NET that takes a set...
1
by: chariclark | last post by:
This may be a quick fix post... ---------------------------- I am having trouble passing multiple values into stored procedure. Here it is below: CREATE Procedure spGetAssociateds ( @PDSI...
3
by: jojo41300000 | last post by:
Hi, I am trying to pass the table name to stored procedure and then use the passing table name in select, update or delete query statement. When I tried to do that, I got the error such as...
4
by: sujiforsql | last post by:
i have a stored procedure like below CREATE PROCEDURE display_Products @CategoryID int AS BEGIN DECLARE @authors_cursor CURSOR SET @authors_cursor =CURSOR FAST_FORWARD FOR SELECT TOP 10...
1
by: quintonmartin | last post by:
Here's my problem. I have a client application that uses a web service for data access. I can read/update many records in many tables, however, I am not getting what I expect for a varbinary(max)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.