How can you tell if a Sql Server Stored Procedure returns records
Within tsql I'm calling a tsql stored procedure that returns a record set. I want to be able to tell if the record set is empty or not empty.
For some reason @@rowcount always returns 1.
What is the best way to do this?
One more thing I'm not in a position to edit this stored procedure.
how to execute a stored procedure SQL (MySQL) on Unix ..? Thank you.
Below is my stored procedure. I want use stored procedure select all row of date from tbl_member and insert 2 table. But it's not work. Some one can help me? Create PROCEDURE sp_test AS BEGIN SET NOCO
How is it possible to run a stored procedure when SQL Server Express Edition starts?
I have a SSIS package that is stored in a SQL Server 2005 DB. I am trying to execute this package from a stored procedure on the same server. Is there a better way than exec master..xp_cmdshell 'dtexe
I'm having trouble with this stored procedure, could you please help. This is error I'm getting - running all this via Oracle Sql developer on SQL Server 2000 hosted elsewhere. Error Error starting a
How can you tell if a PL/SQL Package, Procedure, or Function is being used? Is there an Oracle table or view that contains statistics on PL/SQL Package, Procedure, or Function usage?
This stored procedure is use for searching records. When I only fill in the parameter @ID or @FirstName, it works. But not if I only fill in @LastName. For example: @ID = 1, the rest is NULL -->
Is it possible to write stored procedure that works with a variable number of parameters? (in SQL Server 2005)
Can I create a java stored procedure in MS SQL Server 2005 like in Oracle or DB2?
I have created a table in sql server as Employee, Now I wants to update the table using the stored procedure . ie., the table has emp_name , emp_code and status columns consider the table has three
We have some legacy stored procedures that use the now deprecated feature of SQL Server that allowed you to create multiple versions of a procedure within a procedure. For instance we have.. [up_MyPr
I want to add a new column in an existing stored procedure using C# and save it back to the SQL Server. e.g. I have this SP: ALTER PROCEDURE [dbo].[usp_SP1] AS BEGIN CREATE TABLE #tbl1(a int, b int) S
I am struggling with SQL Server 2005 and JDBC. I have a stored procedure: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go ALTER proc [dbo].[sp_logincheck] @username as nvarchar(50), @password as nvarcha
I am trying to right click a stored procedure in SQL Server Management Studio 2012 and trying to execute a stored procedure which accepts a single parameter of type tblType_XXX which is a User Defined
I want to divide the page, but the following stored procedure is wrong, because use the @size, and how is the right way to accomplish this stored procedure thanks!!! CREATE PROCEDURE message_devidepag
I need to find the user name of the person who modified a particular stored procedure. How do I find out when a stored procedure was last modified or compiled? gives me idea about the time. But how d
I want to create a stored procedure to be used within a stored procedure something like shown below. Is this possible? CREATE procedure parentSP as --child SP definition. CREATE procedure childSP1 @in
Is there anything in the catalog views in SQL Server that will give you a list of the stored procedures like select name from sys.procedures that will also tell you how many parameters each procedure
I have a legacy app written in VB6 talking to a SQL Server 2008 database using ADO 2.5. Within it is a report that gets data from a stored procedure. The stored procedure calls a UDF that returns a va
I have written two SQL Server stored procedures For example: create PROCEDURE query1 AS SQL code here... create PROCEDURE query2 AS SQL code here... Now I can call them individually using the followi
I'm a beginner in hibernate and till this date I have not come across stored procedures. Can somebody tell me how to execute the following in Hibernate, this stored procedure returns three fields dat
I'm trying to pass Japanese characters to a stored procedure in SQL Server. The characters get converted to ???? during execution and hence I get incoreect results. How do I pass them such characters?
I am trying to create a stored procedure that returns all rows that are within a given lat/lng and search radius. When I execute the create code (below) I get: Incorrect syntax near '<' It must
I have a stored procedure that returns records based on a Department ID: Employee Name ManagerID SupervisorID ID John Smith 1 1 1 Tom Jones 1 2 2 Robert Thompson 1 2 3 Jennifer Stevens 1 4 4 I want
How do you execute a stored procedure in subsonic 3.0 that returns a value? For example many of my stored procedures return @@identity, and I can't figure out how to access that value without re query
Helo, My question is I have one Stored Procedure in SQL Server that returns counts of a field. I want to store the results of this Stored Procedure in a variable (scalar?) of a different stored proced
I am trying to create a stored procedure with one parameter. I want the stored procedure to perform an update query and the parameter that I pass when it executes is the table that should be updated.
Referring to How to execute an Oracle stored procedure via a database link., it does not work in my case. I don't know what I am missing. I have a SQL Server instance and Oracle database in the same c
How can one add a sql_variant parameter to a SQL CLR stored procedure? Using System.Object does not work, and I don't see any attributes that I can use. [Microsoft.SqlServer.Server.SqlProcedure] publi
I'm trying to create a stored proc that returns all records that are updated. My update query is this: UPDATE BatchItems SET [Status] = 'Processing' WHERE [Status] = 'Queued' I'm just not sure how to
Is it possible to call a SQL Server stored procedure asynchronously via C#? I have a stored procedure which writes a backup of a specific database (this can takes a longer time) and I want to show th
I have to create a temp table (#temp) from a variable or stored procedure (i.e) My stored procedure contains ...... set @sql='select ...' set @sql=@sql+'..join..' set @sql=@sql+'....join..' when i e
I want to pass xml document to sql server stored procedure such as this: CREATE PROCEDURE BookDetails_Insert (@xml xml) I want compare some field data with other table data and if it is matching that
I have a stored procedure (sql server 2012) with parameter @id int OUTPUT The procedure inserts to the database`s table some data and returns the ID of the affected row SET @id=SCOPE_IDENTITY() RETURN
Is there anyway to access the stored procedure (which is located in another SQL Server in another PC) in my stored procedure? Thanks in advance.
I'm trying to get a result set from a stored procedure in SQL SERVER (2005 I believe) from within my GRAILS app. (Grails 1.3.2, Groovy 1.7.6) The stored procedure runs fine with any query browser, I u
My problem is I’m going to create a SQL stored procedure so that I can create a report based from the stored procedure. Question: How will I be able to display the records in the following sequence? A
I have a SQL Server stored procedure that is not returning any data when I plug in my parameter... ALTER PROCEDURE dbo.EncumBugSearch @year datetime AS BEGIN SET NOCOUNT ON; select * From dbo.BudgetE
What is the difference between a procedure and a stored procedure on sql server?
I have a stored Procedure that returns multiple resultsets(to be specific three resultsets). I just need the first resultset. I am calling the original procedure from a different procedure where i wil
I have an SP that inserts some records and updates others and deletes some. What I want is to return the count values of what was inserted and what was updated and what was deleted. I thought I could
I have several stored procedures that I need to direct where the output log location should be. You can set that in SQL Agent but how do you set this when calling the stored procedure via C#? C# is .N
I am using the following stored procedure to fetch some data from a database. The column meetingDate is formatted as datetime and only contains valid data. How do I have to amend the stored procedure
I got a stored procedure in SQL Server I created some inner joins and now how will I populate my datagrid using that stored procedure. Here is my code that is not working Dim cmd As New SqlCommand Dim
I am working on a .NET project which uses Microsoft SQL server. In this project, I need a CLR stored procedure (written in C#) that uses a remote web service. So, when the stored procedure is executed
I have been using a stored procedure for more than 1.5 years. But I've never considered how data is retrieved from the UI or within another stored procedure. When I write a simple stored procedure. eg
I need to call a stored procedure several times. How can I put this in a loop? DECLARE @return_value int, @sinresultado varchar(200), @svcmensaje varchar(200) EXEC @return_value = [dbo].[ppocfdcancela
I am trying to execute a SQL Server stored procedure from Excel VBA. The procedure returns rows into a result set object. However, while running the code, it throws an error: 3704 Operation is not al
I have a table with a complex trigger that eventually calls the Service Broker to run a stored procedure with a parameter that is a table (custom type). I can step into the INSERT and the trigger, b
Can anyone give me a sample script for batch insert/update of records in table using stored procedure in SQL Server?