473,434 Members | 1,834 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,434 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 2497
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)...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.