473,799 Members | 3,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stored procedure from asp help

I have a stored procedure that I am executing with this SQL
osp_instrument_ swap @InstrumentFrom = 'testname', @InstrumentIDTo = 37,
@Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604, 605, 606,
607, 608, 609, 610, 611, 612, 613, 616'

the @Schedules are ID fields in a table that are integers. I would like to
do an Update blah, Where ScheduleID in (@Schedules) instead of looping. How
can I do this? I have to sent the values to the sproc as text, right? Where
do I covert to the int data type and how?

Thanks for your help
Mike
Jul 22 '05 #1
6 1232
http://www.aspfaq.com/2448

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mike D" <Mi***@discussi ons.microsoft.c om> wrote in message
news:B1******** *************** ***********@mic rosoft.com...
I have a stored procedure that I am executing with this SQL
osp_instrument_ swap @InstrumentFrom = 'testname', @InstrumentIDTo = 37,
@Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604, 605, 606,
607, 608, 609, 610, 611, 612, 613, 616'

the @Schedules are ID fields in a table that are integers. I would like to do an Update blah, Where ScheduleID in (@Schedules) instead of looping. How can I do this? I have to sent the values to the sproc as text, right? Where do I covert to the int data type and how?

Thanks for your help
Mike

Jul 22 '05 #2
Am I missing something? I read that and don't see anything that applies to
my problem. Did you post the right link?

Thanks again
Mike

"Aaron [SQL Server MVP]" wrote:
http://www.aspfaq.com/2448

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mike D" <Mi***@discussi ons.microsoft.c om> wrote in message
news:B1******** *************** ***********@mic rosoft.com...
I have a stored procedure that I am executing with this SQL
osp_instrument_ swap @InstrumentFrom = 'testname', @InstrumentIDTo = 37,
@Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604, 605, 606,
607, 608, 609, 610, 611, 612, 613, 616'

the @Schedules are ID fields in a table that are integers. I would like

to
do an Update blah, Where ScheduleID in (@Schedules) instead of looping.

How
can I do this? I have to sent the values to the sproc as text, right?

Where
do I covert to the int data type and how?

Thanks for your help
Mike


Jul 22 '05 #3
Mike D wrote:
I have a stored procedure that I am executing with this SQL
osp_instrument_ swap @InstrumentFrom = 'testname', @InstrumentIDTo =
37, @Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604,
605, 606, 607, 608, 609, 610, 611, 612, 613, 616'

the @Schedules are ID fields in a table that are integers. I would
like to do an Update blah, Where ScheduleID in (@Schedules) instead
of looping. How can I do this? I have to sent the values to the
sproc as text, right? Where do I covert to the int data type and how?

Thanks for your help
Mike

This is relevant:
http://www.sommarskog.se/arrays-in-sql.html

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #4
Sorry.
http://www.aspfaq.com/2248

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mike D" <Mi***@discussi ons.microsoft.c om> wrote in message
news:54******** *************** ***********@mic rosoft.com...
Am I missing something? I read that and don't see anything that applies to my problem. Did you post the right link?

Thanks again
Mike

"Aaron [SQL Server MVP]" wrote:
http://www.aspfaq.com/2448

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Mike D" <Mi***@discussi ons.microsoft.c om> wrote in message
news:B1******** *************** ***********@mic rosoft.com...
I have a stored procedure that I am executing with this SQL
osp_instrument_ swap @InstrumentFrom = 'testname', @InstrumentIDTo = 37, @Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 616'

the @Schedules are ID fields in a table that are integers. I would
like to
do an Update blah, Where ScheduleID in (@Schedules) instead of
looping. How
can I do this? I have to sent the values to the sproc as text, right?

Where
do I covert to the int data type and how?

Thanks for your help
Mike


Jul 22 '05 #5
Thanks to both of you for your replies. It helps me solve the problem. Does
the new SQL Server (2005?) have any better way to handle arrays than SQL
Server 2000??

Thanks
Mike
"Bob Barrows [MVP]" wrote:
Mike D wrote:
I have a stored procedure that I am executing with this SQL
osp_instrument_ swap @InstrumentFrom = 'testname', @InstrumentIDTo =
37, @Schedules = '593, 594, 596, 598, 599, 600, 601, 602, 603, 604,
605, 606, 607, 608, 609, 610, 611, 612, 613, 616'

the @Schedules are ID fields in a table that are integers. I would
like to do an Update blah, Where ScheduleID in (@Schedules) instead
of looping. How can I do this? I have to sent the values to the
sproc as text, right? Where do I covert to the int data type and how?

Thanks for your help
Mike

This is relevant:
http://www.sommarskog.se/arrays-in-sql.html

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Jul 22 '05 #6
> Thanks to both of you for your replies. It helps me solve the problem.
Does
the new SQL Server (2005?) have any better way to handle arrays than SQL
Server 2000??


If you're brave enough to try the CLR, you can code stored procedures and
other modules using .NET languages. So I imagine there is a way to do it
yourself, but nothing native... there are still no such things as "arrays"
in relational data...

There is better XML handling, so you might be able to pass data structures
in that way, as well.

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 22 '05 #7

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

Similar topics

4
10905
by: Michael Trosen | last post by:
Hi Everyone, I hope someone can help, I'm pretty new to pro*c programming. I have the following application setup: a pro*c program calls a stored procedure and recieves a cursor back: the cursor is defined as: SQL_CURSOR delpt_cursor
3
22148
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my application server can talk to the database. I've determined the failure occurs when the the following statement is executed: cstmt.execute(); (due to the failure of println statements placed afterwards). I get the following error after trying to...
3
6587
by: Jarrod Morrison | last post by:
Hi all Im relatively new to using stored procedures and im not sure if it is possible to do what I am trying to do so any help here is greatly appreciated. I am using the variable @MachineName which is obviously the local machine name mainly in this procedure. What is loop through from the first character of the variable to the last and use this data in a select statement. I have included the code below for what I have tried so far but I...
7
1625
by: Douglas Buchanan | last post by:
I can't seem to open SQLS2k Stored Procedures in the IDE I am running MDE 2003 Version 7.1.3088 I have a MSDN professional subscription and did a complete install of vs.net Help explains how to do it: 1. In Server Explorer, expand the Stored Procedures folder. 2. Double-click the name of the stored procedure you want to open.
4
13471
by: marc | last post by:
I've been developing a stored procedure that uses a user defined function in the query portion of the procedure. However, since the end product needs to allow for dynamic table names, the UDF will not work. I've been trying to get this to work with converting the UDF to a procedure, but I'm having no luck. Here is the background on what I'm trying to accomplish. I need to perform a sub-identity on a table, I have the normal identity set,...
3
2807
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default" when I launched the IBM Distributed Debugger via D:\IBMDebug>idebug.exe -qdaemon -quiport=8000,8001 First, a bit of background. I am running DB2 V7.2 with Fixpack 9 applied on Windows XP Professional (all critical service applied). I've written...
5
2844
by: microsoft.private.windows.netserver.setup | last post by:
I have a very strange thing occurring in the program. I have a dataset retrieved from a stored procedure that just select * from a table. I then try to use the SQlCommandBuilder on the dataset, and fails. I try the same select statement directly and not using a stored procedure and use SQLCommandBuilder, the program works. This is a ASP.net page, and I am stumped. I would like to use the stored procedure rather than controlling it in...
7
5846
by: eholz1 | last post by:
Hello PHP group, Could someone help me out? I have PHP 5.2, Apache 2.0, and MySQL 5.0 running on Linux (Redhat Fedora Core 6). All that works fine. I would like to be able to "call" a stored procedure from a PHP program, and run a stored procedure. I have yet to figure out the proper way to do this. My stored procedures work fine from the mysql command line using syntax: "call sp_min_record (101);"
9
8990
by: jyothi1105 | last post by:
Hi all, Here is some information which could help people who want to create stored procedures and execute them in their program. You can create stored procedures in two ways: Through front end or writing procedure from backend SQLServer. Back End First we'll cover how to write a stored procedure in back end. The following example is how to create a store procedure for MSSql Server:
0
3192
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works fine. Now we decided to move from mainframe IMS-DB2 to Windows 2003 server-DB2 UDB for LUW 9.5.
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5589
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.