Stored Procedures Questions


Output errors from SQL Server stored procedure
I have a stored procedure using SQL Express that update a table using data from another table. All is well except that from time to time the source table might have data that causes an error. I would like to add some code to the stored procedure that will catch the error, output the details [...]

Answer Question   |  April 26, 2009  1:28 AM
SQL, SQL error handling, SQL Server Express, SQL Server stored procedures, Stored Procedures
asked by:
35 pts.

optimization of stored procedures in sqlserver
is there any stored procedure optimization techniques actually my problem is my stored procedure is getting information from 15 tables by joins and have some conditions in where clause to get 15,000 records it is taking 40 sec how can i improve the my stored procedure thanks, naresh

Answer Question   |  February 10, 2011  6:15 AM
SQL Server stored procedures, Stored Procedures, Stored Procedures Optimization
asked by:
5 pts.

How to use Store Procedure for multiple column database update?
I created a store procedure to update a table based on values from another table using inner join. 15 records need to be updated but when the store procedure is executed no rows are updated bu the return value is 0.

Answer Question   |  March 24, 2009  3:28 AM
INNER JOIN, Stored Procedures
asked by:
5 pts.

How do I refresh the Stored Procedure used for Crystal Reports datasource
I have an existing Crystal Report that uses a Stored Procedure as a datasource. The requirements have changed and the Procedure has been updated to have only one parameter instead of two. How do I refresh the Stored Procedure without removing it. I have tried to Verify the Database but just get an error stating [...]

Answer Question   |  February 27, 2009  4:12 AM
Crystal Reports, SQL Server, SQL Server stored procedures, Stored Procedures
asked by:
55 pts.

Explain Stored Procedures in AS/400
Hi, Can any one please explain me 1.What is stored procedures in AS/400. 2.What is the use of Stored Procedure 3.Please give me small example how to code stored procedures in AS/400 4.What is the object type of Stored procedures 5. How can we code stored Procedures and how can we call it. and main [...]

Answer Question   |  February 20, 2009  8:31 AM
AS/400 development, AS/400 stored procedures, Stored Procedures
asked by:
695 pts.

How can I pass tablename as a parameter in MySQL stored procedure?
my SQL stored procedure is like this…. ALTER PROCEDURE [dbo].[Sp_InsertDataMaster] @_ImageID int, @_Stat bit, @_tablename nvarchar(200) AS begin declare @strTemp nvarchar(max) set @strTemp = ‘Insert into ‘ + @_tablename + ‘(ImageID,Status) values (‘+ convert(nvarchar(5),@_ImageID) +’,'+ CONVERT(nvarchar(1),@_Stat) +’)’ –print @strTemp exec(@strTemp) end I want this stored procedure in MYSQL.

Answer Question   |  February 18, 2009  8:38 AM
Database programming, MySQL, MySQL Stored Procedures, SQL, SQL stored procedures, Stored Procedures
asked by:
45 pts.

How to use embedded SQL in a RPG program used as a stored procedure
When I use embedded SQL in a RPG program and call it from another program it works fine. But, when I try to use the program as a stored procedure it gives me a SQL error. I have worked with stored procedures and understand them, but have not been successful using embedded SQL with them. [...]

Answer Question   |  February 12, 2009  9:36 PM
Embedded SQL, iSeries RPG programming, Stored Procedures
asked by:
20 pts.

Stored Procedures, One Database, Different Software Releases
Hi Everyone. Currently at my work we use SQL in our VB.NET code. I have previously always used stored procedures for all of their benefits. My company has said that our customers might use different versions of our software against its one database. For example: While a customer is migrating from release 1 to release [...]

Answer Question   |  February 24, 2009  9:20 AM
Release management, Software maintenance, SQL, Stored Procedures, VB.NET, Visual Basic .NET
asked by:
5 pts.

Passing an array into a Stored Procedure
is there a possibility of passing an array into a Stored procedure i am using java and sqlserver 2000

Answer Question   |  February 2, 2009  7:40 AM
Arrays, Java, SQL Server stored procedures, Stored Procedures
asked by:
5 pts.

Permissions for writing stored procedures in MySQL
Hi Friends, I have been using navicat to connect MySql5.0 in my local evironment.I connect my java project to MySql database as backend. Now my problem is, I generated an sql script to backup my local database. I run the script in server. Tables were created. But in the case of stored procedure, I got [...]

Answer Question   |  January 27, 2009  12:31 PM
Database Backup, Error 1044, Java development, MySQL, MySQL Access Denied error, MySQL backup, MySQL Stored Procedures, Navicat, SQL stored procedures, Stored Procedures, Web development
asked by:
5 pts.

Can embedded SQL in a SQLRPGLE program be used as a stored procedure?
I am successfully using (external) stored procedures with many RPGLE programs. (Some of these are SQLRPGLE programs because they return a result set.) All of this works fine. But if I try to replace some of the RPG I/O in a RPGLE program with embedded SQL, creating a SQLRPGLE program, and run it as a [...]

Answer Question   |  January 15, 2009  10:09 PM
Embedded SQL, iSeries development, iSeries RPG programming, RPG, RPGLE, SQL, SQLRPGLE, Stored Procedures
asked by:
20 pts.

stored procedure component
what is the difference between the way of using storedprocedure component in delphi5 and delphi7?

Answer Question   |  January 12, 2009  1:36 PM
Delphi, Delphi 5.0, Delphi 7.0, Stored Procedures
asked by:
VPL
95 pts.

Is there a way to retrieve datatypes from stored procedures?
I have used the following simple query to retrieve datatypes from sql 2000 tables. select TABLE_NAME, COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH from <tablename>.information_schema.columns where table_name = ‘<tablename>’ and column_name = ‘<columnname>’ Is there a way to retrieve datatypes from stored procedures?

Answer Question   |  January 9, 2009  8:34 PM
SQL 2000, SQL stored procedures, SQL tables, Stored Procedures
asked by:
15 pts.

ALTER INDEX statement
‘ALTER INDEX ‘ || C_Indices.INDEX_NAME ||’ REBUILD ‘; ‘ALTER INDEX ‘ || C_Indices.INDEX_NAME || ‘ REBUILD ONLINE COMPUTE STATISTICS’; In my stored procedure , i am reconstructing or you can say re-building the tables and table name is the input parameter to the procedure. In middle of the code , i am using execute immediate [...]

Answer Question   |  December 17, 2008  12:54 PM
ALTER INDEX statement, EXECUTE IMMEDIATE statement, Oracle development, Oracle SQL, Oracle stored procedures, SQL statements, Stored Procedures
asked by:
5 pts.

Inserting rows and multiple rows in SQL Server 2005 Express
Anyone there who can help me solve my problem? I can’t continue my program because of this problem which I know someone can solve or can suggest the best possible solution. I have a project in my study doing simple accounting program. To facilitate the discussion, I will just show you the three tables where [...]

Answer Question   |  December 15, 2008  2:16 PM
INSERT statement, SQL Server 2005, SQL Server 2005 error messages, SQL Server 2005 Express, SQL Server stored procedures, Stored Procedures, VB.NET, Visual Basic .NET
asked by:
5 pts.

PLS-00103: Encountered the symbol “E_PROD_REQ_ID_NOT_FOUND” when expecting one of the following:
how can i resolve that error? when i compile the store proc….it compiled without any errors….but in a package its throwing error

Answer Question   |  December 13, 2008  8:50 PM
Oracle error messages, PLS-00103, Stored Procedures
asked by:
5 pts.

SSRS Performance
I Have created an SSRS Report for retrieving 55000 records using a Stored Procedure.When Executing from SP it is taking just 3 Seconds but when executing from SSRS report It is taking more than one Minuits.How i can solve this problem?

Answer Question   |  December 20, 2008  12:05 PM
SQL Server Reporting Services, SQL Server stored procedures, SSRS, SSRS Performance, Stored Procedures
asked by:
5 pts.

Setting a range constraint without a stored procedure in a SQL Server table
I have a table in SQL Server named CustInfo that is as follows: table CustInfo ( startdate datetime enddate datetime CustomerCode int address nvarchar(200) ) I want to define a range constraint to insure that only one address is allowed for a specific customer in a specific range of dates. For example: 2008-01-01,2008-10-27,11,’13 Lexington st’ [...]

Answer Question   |  December 2, 2008  4:44 PM
SQL Server tables, Stored Procedure Constraints, Stored Procedures
2,585 pts.

Date formats in SQL Server Stored Procedures
This one will be easy, I’m sure. I’m a novice at Stored Procedures, and I’m wondering what function I can use to display a smalldatetime field (currently displaying as Dec 19, 2008 12:00AM) as a short date (12/19/2008)? I am on Sql Server…

Answer Question   |  November 11, 2008  9:18 PM
DateTime, SQL Server stored procedures, Stored Procedures
asked by:
5 pts.

SSIS package
I am supposed to Run an sproc /script for more than one database. I thought of scheduling this sproc as a job for all database instances. But, DBA’s suggested me to go with SSIS Package. Can any one quide me in doing this.

Answer Question   |  November 6, 2008  12:57 PM
Business Intelligence, SQL Server 2005, SQL Server 2005 Integration Services, SQL Server Integration Services, SQL Server stored procedures, SSIS Package, Stored Procedures
asked by:
5 pts.