Stored Procedures Questions and Answers

Recent IT Questions

1 - 20 of 94
<<PREVIOUS 1|2|3|4|5 NEXT>>

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...

View Answer   |  Nov 19 2009  6:54 PM GMT
SQL, Stored Procedures, CREATE TABLE statement
asked by MasterK

  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...

Answer Question   |  Nov 16 2009  6:29 PM GMT
SQL 2005, T-SQL, Stored Procedures
asked by LL123

  5 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,...

View Answer   |  Nov 12 2009  9:07 PM GMT
SQL, SSIS, Stored Procedures
asked by 2747031103112747

  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.   Software/Hardware used: as/400

View Answer   |  Nov 5 2009  7:50 PM GMT
Stored Procedures, AS/400 stored procedures
asked by Aceofdelts

  385 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. Software/Hardware used: sql server

Answer Question   |  Oct 14 2009  6:46 PM GMT
Stored Procedures, Backup & recovery
asked by SQL Server Ask the Experts

  2445 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. ...

View Answer   |  Aug 26 2009  7:13 PM GMT
Stored Procedures, AS/400, SQLRPG
asked by Aceofdelts

  385 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 "domain\srvc" that has sysadmin...

View Answer   |  Jul 30 2009  3:45 PM GMT
Stored Procedures, SQL stored procedures, SQL Database
asked by Tcstl

  55 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)

View Answer   |  Jun 19 2009  12:46 AM GMT
Impact analysis tools, .NET, Java
asked by Kvrao

  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.

View Answer   |  Jun 12 2009  3:17 PM GMT
RPGLE, CL, Stored Procedures
asked by NCharette

  5 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...

View Answer   |  May 21 2009  6:33 PM GMT
SQL stored procedures, SQL 2000, Stored Procedures
asked by Bleeb

  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...

View Answer   |  Apr 24 2009  3:15 PM GMT
SQL stored procedures, Stored Procedures
asked by Andy1999972

  15 pts.

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 to a...

asked by Spionred

  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

asked by Naresh1226

  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.

View Answer   |  Mar 24 2009  3:28 AM GMT
Stored Procedures, INNER JOIN
asked by KjitSingh

  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...

Answer Question   |  Feb 27 2009  4:12 AM GMT
Crystal Reports, SQL Server, Stored Procedures
asked by Flyght

  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...

asked by Mohan K

  470 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) +','+...

View Answer   |  Feb 14 2009  8:38 AM GMT
MySQL Stored Procedures, MySQL, Database programming
asked by Minal

  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. Any ideas...

asked by Warykat

  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...

View Answer   |  Feb 4 2009  9:20 AM GMT
Stored Procedures, SQL, Release management
asked by Danol21

  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

View Answer   |  Jan 30 2009  7:40 AM GMT
Arrays, SQL Server stored procedures, Java
asked by Khperi

  5 pts.

1 - 20 of 94
<<PREVIOUS 1|2|3|4|5 NEXT>>