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...
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...
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,...
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
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
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. ...
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...
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)
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.
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...
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...
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...
SQL Server stored procedures, SQL error handling, SQL Server Express
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
Stored Procedures, SQL Server stored procedures, Stored Procedures Optimization
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.
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...
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...
AS/400 stored procedures, AS/400 development, Stored Procedures
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) +','+...
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...
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...
is there a possibility of passing an array into a Stored procedure i am using java and sqlserver 2000


