i am using this code which is giving error. if (@report_type = 'CM') Begin Select distinct Region,sum(ClientCount) as ClientTotal Into #NewTemp From ( End else if (@report_type = 'AM' ) Begin ( Select distinct Region,Area,sum(ClientCount) as ClientTotal Into...
I have created the following stored procedure in SQL: CREATE procedure [dbo].[sp_trip_number] @Table_Name nvarchar(100), @Trip_Number int output as begin set nocount on begin transaction DECLARE @DynamicSQL NVARCHAR(1000) DECLARE @New_Trip_Number int SET @DynamicSQL='INSERT INTO...
If you could, could you please give a list of the relevant changes that have been done to stored procedures from SQL Server 2000 to SQL Server 2005?
SQL Server 2005, SQL Server migration, SQL Server stored procedures
I have developed an order entry application in SQL Server for a client. One of its functions is to insert invoices into the relevant tables. The procedure only does the job 997 times out of 1000 on average. In a single day, that means that hundreds of invoices are incomplete. No errors are...
My developers create MS SQL Stored Procedures on a development server. What is the best way to move/copy those SPs to the production server (different machine)?
SQL Server stored procedures, SQL Server Stored Procedure Migration
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?
How do views, user-defined functions (UDFs) and stored procedures work in SQL, and what conditions are there on their usage?
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...
I need to write a stored procedure to insert into a SQL database the contents of a file that has been in read in ASP.net. How would I do this?
Hi the code is like this. Its taking too long to excute. if exists(select jbadsd from saldayf sa where substring(convert(char(7),sa.jbadsd),4,4) = substring(convert(char(7),@jbadsd),4,4) and substring(convert(char(7),sa.jbadsd),2,2) = '07') --print'exists' update [national].dbo.tempsaldayfna ...
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.
I have a stored procedure that runs on my Production database in 0.394 seconds. However, when I try to run the SP on a DEV box it takes well over 15 minutes to run *every* time. I have checked indexes and everything seems to be identical (I did a backup/restore to the Dev box in the first...
Using LSXODBC and ODBCResultSet, how do you pass parameters to a stored procedure using result.Execute or result.ExecProcedure? I am looking for a working example not just syntax.
I’d like to execute different tables at runtime on my SQL Server by creating stored procedures. This is the syntax I am attempting to use: "create procedure sp1(colname varchar(400), tab_name IN varchar2) AS BEGIN select * from '@TABLENAME' where CompanyName='@COLUMNNAME' end" Is this syntax...
I 've a problem with porting my ms access database to sql server. In my inventory database, i have 4 tables: (1)Purchase, (2)Sales, (3)Quantity Adjustment, (4)Amount Adjustment. I want to calculate the stock position from those 4 tables. In access database, i do with this kind of queries : a....
Microsoft Access, SQL Server stored procedures, SQL Server database
when a stored procedure is executed in query analyzer its working fine and getting the result quickly.but when same procedure is executed through visual studio timeout expired error is generated.can any one olve this issue
I want to have a stored procedure on a server in Domain A, read data from some tables in Domain B. Is this possible in SQL Server?
WE are dealing with stored procedures in a PL/SQL program. I am trying to execute the procedure from within the program itself. Is there a need to do it within a cursor or is there a specific manner to do that?!
Is there any way I can create a stored procedure which will check for the Transaction Log file size - where we have a specified limit to grow - and if the Log file reached 80 percent of total size, email alerts can be sent to DBAs?
SQL Server availability, SQL Server transaction logs, SQL Server stored procedures


