Stored Procedures Questions


iSeries SQL function in a SQL procedure – error: Function Name “in *LIBL type *N not found.”
A while back, Seeker1 posted this question.  Unfortuantely, he didn’t provide enough information for Tom to help.  Well – I have the same problem so hopefully, this will be enough. This Select statement generates the error: SELECT UNUNIT, ITRVEHLOC(UNUNIT  , 'CITY ')  FROM Units Here are the supporting commands and code: Create Function                                        ITRVEHLOC(                                                   UNIT        [...]

Answer Question   |  July 16, 2010  8:13 PM
iSeries, iSeries RPG programming, RPG ILE, SQL, Stored Procedures
asked by:
1,495 pts.

To write a stored procedure
there are two tables one ZipCode and one tempTable each has ZipCode and CongDist as columns. Each Zipcode has more than one CongressionalDistrict. How can I write a SP to have a seperate entry for each senario of Zipcode and Congressional District in tmp Table

Answer Question   |  June 10, 2010  1:49 PM
Relational databases, SQL Server stored procedures, Stored Procedures
asked by:
25 pts.

Using stored Procedure in SSRS
Hi…. I am trying to create a Report using Report wizard in MSSRS 2005, I am trying to use Stored Procedure. The steps which I am following are below…. Solution Explorer–> Add New Report–> Next(as DB is already shared one)–> Query Builder (But when going into query builder the command text is disabled and I [...]

Answer Question   |  June 3, 2010  8:24 PM
SQL Server 2005, SQL Server Stored Procedure Migration, SSRS, Stored Procedures
asked by:
5 pts.

SQL 2005 Database Compare
If there a way to compare two similar database to find where a Stored Procedure is different between the second database. Different in it not there or the Create Date or Modify Date is different?

Answer Question   |  May 27, 2010  5:24 PM
SQL 2005, SQL 2005 Database, SQL Database, Stored Procedures
asked by:
5 pts.

How to find who called a stored procedure
I would like to know what process or stored procedure called one of my stored procedures. Is there any way of getting this information from SQL Server 2005? Thanks in advance, Ed

Answer Question   |  May 28, 2010  2:37 PM
SQL Server, SQL Server 2005, SQL Server 2005 SP3, Stored Procedures
asked by:
15 pts.

How to read data from a stored procedure in RPGLE
How do I read data from a stored procedure?

Answer Question   |  March 2, 2010  1:30 PM
RPGLE, RPGLE Stored Procedures, Stored Procedures
asked by:
15 pts.

Where did the undocumented stored procedures go in SQL Server 2008 Managment Studio?
Is there a way to see the undocumented stored procedures in SQL Server 2008?  They don’t seem to show up in the explorer tree in Management Studio the way they did in SQL Server 2000′s Enterprise Manager. I was able to run XP_FIXEDDRIVES but it doesn’t show up in the list under stored procs in [...]

Answer Question   |  January 14, 2010  4:23 PM
SQL Server 2008, Stored Procedures, undocumented
asked by:
5 pts.

When submitting a procedure via CL program, i do not get any abnormal end message.
When submitting a procedure via CL program, i do not get any abnormal end message even though the procedure has not not completed normally, is there anyway by which we can find the cause of the failure of the completion of the procedure normally.

Answer Question   |  March 8, 2010  1:02 PM
CL programming, CL programs, CLP, Stored Procedures
asked by:
1,160 pts.

RPGLE external stored procedure when called with OUT parameter having issues when called from C#
We have created some stored external procedure with paramter type OUT but these were giving memory protection at C# side.However when we call it from operation navigator ,it is running succesfully.I created some SQL stored procedure with OUT paramteres and these were working correctly when invoked from C#.What can be the issue with external Stored [...]

Answer Question   |  January 13, 2010  9:02 AM
RPGLE, RPGLE Stored Procedures, Stored Procedures
asked by:
5 pts.

Msg 102, level 15, State 1, Line 14
Hi, I’m ttrying to create my db tables in a stored procedure and I keep getting the error that the syntax is incorrect around the ‘ON’ on the line “SET ANSI_NULLS ON”. Could you please help me? I can’t see what’s wrong. Here’s my code:  CREATE PROCEDURE InsertDBTables  AS  BEGIN  SET NOCOUNT ON;  SET ANSI_NULLS [...]

Answer Question   |  November 19, 2009  6:54 PM
CREATE TABLE statement, SQL, Stored Procedures
asked by:
15 pts.

passing data between two SQL Server databases
I am having an issue to passing data between two SQL Server databases.  I can not simply use Import/Export functions or Data Transfer Functions from SSIS because I was asked to transfer “20%” data with more than 15 criteria among 200 related tables.  Also we are not allowed to use the linked server,  which means I can not access [...]

Answer Question   |  January 12, 2010  6:29 PM
SQL 2005, SSIS, Stored Procedures, T-SQL
asked by:
25 pts.

Passing data between two SQL Server databases
I am having an issue to passing data between two SQL Server databases. I can not simply use Import/Export functions or Data Transfer Functions from SSIS because I was asked to transfer “20%” data with more than 15 criteria among 400 tables. Also we are not allowed to use the linked server, which means I [...]

Answer Question   |  November 19, 2009  9:07 PM
Linked Server, Passing Data, SQL, SSIS, Stored Procedures
asked by:
15 pts.

Stored procedure content
Is there a way to “retrieve source” on a Stored Procedure ?  I need to find out what 2 of our Stored Procedures do – especially what programs thay call. Of course, no documentation and no methodology for source-based creation.  

Answer Question   |  November 6, 2009  7:50 PM
AS/400 stored procedures, Stored Procedures
asked by:
1,565 pts.

Writing a stored procedure across two databases
I currently backup our live databases and restore them into a QA environment. This doesn’t cause a problem with our stored procedures as they have all been written without hard-coded database names.

Answer Question   |  January 12, 2010  6:46 PM
Backup & recovery, Stored Procedures
2,585 pts.

AS/400 stored procedures
Is there a way to list the existing stored procedures on our box ? Those that wrote them are gone and documentation is sketchy. We found some by using any SQLRPG source as a clue but none of these were “create” routines (some were actual procedures). Seems like there ought to be an easier way.

Answer Question   |  August 26, 2009  7:13 PM
AS/400, SQLRPG, Stored Procedures
asked by:
1,565 pts.

execute as with synonym
This is a good one, I have a stored proc in database A that first deletes some rows from a table in database A. it then does a delete from a synoym that references a table in a different database. We were trying to use a “execute as” with a windows sql account “domainsrvc” that [...]

Answer Question   |  August 11, 2009  3:45 PM
SQL Database, SQL stored procedures, Stored Procedures
asked by:
90 pts.

Code Impact Analysis Tool
Hi, Need a tool to do the impact analysis of .net/java/com code files and should produce the matched code/classes/objects/methods/references etc. for a particular database hit (stored-procedure or select/insert/update query)

Answer Question   |  April 9, 2012  12:46 PM
.NET, Impact analysis tools, Java, Performance and availability, Stored Procedures
asked by:
5 pts.

Create a Stored Procedure using CL and RPGLE programs
I have an RPGLE program called from a CL program for database files overrides. I want to call the same programs from a stored prodecure on SQL Server from within a Web application. I am brand new to SQL Server but am pretty good on the AS400.

Answer Question   |  August 26, 2009  3:17 PM
CL, CL Program, RPGLE, RPGLE Program, Stored Procedures
asked by:
20 pts.

Error inserting into table with identity column
I have 2 stored procedures. Both insert records into table variables, and each of those table variable has an identity column. One procedure executes and the other gives an error telling me that I am explicitly trying to insert into the identity column (which I’m not). Here is the code from the 2 procs: This [...]

Answer Question   |  May 30, 2009  6:33 PM
SQL 2000, SQL stored procedures, Stored Procedures
asked by:
45 pts.

Stored Procedure
Hi Guys. Any help would be greatly appreciated. I have three tables Table 1 ID PurchaseOrderNo Value Table 2 ID PurchaseOrderNo WorkID Table 3 WorkID Cost Tables 2 and 3 have a many to one relationship with table 1. I want to display all the PurchaseOrderNo from table 1 and then the sum of Costs [...]

Answer Question   |  April 27, 2009  3:15 PM
SQL stored procedures, Stored Procedures
asked by:
15 pts.