473,394 Members | 1,751 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,394 software developers and data experts.

Replace the variable value with new one (in all SP's)

Hi,

I have a variable and it’s used in my all stored procedure. I want to replace the variable value with new one. Is there a way we can replace the variable with some other one in all the SP and recompile it using the Query.

Thanks,
JK
Jun 24 '11 #1
2 1742
ck9663
2,878 Expert 2GB
I don't think there is an easy way of doing this other than going through each SP and changing it. Why do you need to do it? Maybe there are other ways of doing it.

~~ CK
Jun 24 '11 #2
Rabbit
12,516 Expert Mod 8TB
This will get all the stored procedures and their text.
Expand|Select|Wrap|Line Numbers
  1. SELECT name, text
  2. FROM sysobjects o
  3.     INNER JOIN syscomments c ON o.id = c.id
  4. WHERE xtype = 'P ';
How you proceed from there is your choice. You could either do the update in an external script or use a cursor to step through each one in SQL.

Whatever you decide, you will need to find a way to deal with comments as the text returned doesn't have any line breaks.
Jun 24 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: ryu | last post by:
Hi all, I have a xml document where I have to replace the value of node type that is text. For example, if the value of a node whose type is 'text' is 'Toyota', I would like it to be...
12
by: harishg2 | last post by:
Hi, How to store a variable value for more than one executions. Ex: main() { int i=0; i++; printf("%d",i);
1
by: Varadha | last post by:
Hi, I am declaring a variable static char Version_No = '1' in header file header.h In a application "app.exe", i am changing the value of the variable in to '2' In the same application i am...
3
by: Helpseeker | last post by:
Hi all, I have written a small code in which i declare a static int variable and increment its value by one each time i click on a button. actually i use the int variable value in a particular URL...
6
by: paul | last post by:
HI! How do we send a variable from an Iframe page back to its parent? I have a script that calculates the iframe's window size but I need to know how to send that value back to its parent so I...
4
by: simon | last post by:
hello, i am displaying a dataset in a datagrid, for one of the values being displayed it either comes back as a 1 or a 0, which is currently bound to a column in the datagrid what i'd like to do...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
0
by: tharika_c | last post by:
Hi, We have a simple ASP.NET web application where one of the Session variables, called Session("SSO_ID") gets created and assigned a value (equal to the HTTP_HRID request variable value),...
2
chathura86
by: chathura86 | last post by:
hi, i'm retrieving a string from a database and i want to insert a value which comes from another variable into that. for a example String in the data base: "Dear %name%, Thank you" and i...
1
by: pendem | last post by:
I mean can set a variable value in a script to be unchanged even after page reload? for example if i set a value of a global variable "val" to 2 ; so using onbeforeunload() or onunload(), i will...
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: 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
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?
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
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
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...

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.