Topic profile page for Stored procedure.
This page has aggregated data from forum posts, threads, listings, online discussions, newsgroups, messageboards, and other online sources which contain user generated content for the term: Stored procedure.
Topic "Stored procedure" was discussed 11,355 times on 353 sites in last 3 months
Started 1 day, 13 hours ago (2009-11-24 14:23:00)
by Tomadams
I have a situation where my customer wants to run a report by any one of 4 dates. I have this in my where clause: and (case when @DateType = 'Date1' then ([filename].[Date1] between @StartDate and @StopDate) when @DateType = 'Date2' then ([filename].[Date2] between @StartDate and @StopDate) when @DateType = 'Date3' then ([filename].[Date3] between @StartDate and @StopDate) when @DateType = ...
Started 1 day, 16 hours ago (2009-11-24 11:14:00)
by TJ_1
Hello room, I just completed the transactional when changes made in the publisher data. The Distribution agent failed with the following errors: Could not find stored procedure 'sp_MSins_dbo_Table_Name' Command attempted: if @@trancount > 0 rollback tran (Transaction sequence number: 0x0000CC7100003911000100000000, Command ID: 3) Error messages: Could not find ...
Started 1 day, 17 hours ago (2009-11-24 10:20:00)
by AgentM
Hi, I am new to T-SQL and I am trying to use "declare" in a stored procedure. I am getting a syntax error not sure why, any help appreciated. Here's the code :- CODE ALTER PROCEDURE [dbo].[TOTALCOUNT] @StartDate DateTime, @EndDate DateTime AS BEGIN SET NOCOUNT ON; DEclare @TOTALPEOPLE int, @TOTALMEN int SET @TOTALPEOPLE = 10000 SELECT col1, @TOTALPEOPLE, @TOTALMENFROM ...
Started 1 day, 18 hours ago (2009-11-24 09:10:00)
by 70001864
hi is it posible to combine an delete and insert in a stored procedure ?? What I want is first to delete the actuel rows and then insert some new rows If posible how ?
Started 1 day, 21 hours ago (2009-11-24 06:41:00)
by nt86
I have a simple stored procedure where it grabs two datetime fields from a table and then gets the datediff between these, it then identifies and splits these hours into two categories, night hours and day hours and updates two fields in a table called TBL_PC_ON. Heres my stored procedure, it executes fine but its not updating any rows, any ideas why it isn't?. Sorry not very familiar with ...
Started 1 day, 23 hours ago (2009-11-24 04:08:00)
by JmME102
Call Oracle stored procedure from VBA I am using Excel 2007 and in VBA, using ADODB connections to Oracle to retrieve from and insert data into Oracle tables. Works great. But I need to call a stored procedure (xxx_pkg.function) from VBA... what would be the syntax/method to do that... I've searched around and came up dry....
Started 2 days, 1 hour ago (2009-11-24 02:47:00)
by Calvin Lam
Dears, The following is a WPF Datagrid which is binding to an entity named Category (Category with association to SubCategories in 1 to N modes), I need the data showing on the same datagrid rather seperating them into two. Category ID Category Name SubCategory ID SubCategory Name 1 Hardware 1...
Started 2 days, 1 hour ago (2009-11-24 02:34:00)
by Calvin Lam
Dears, Technologies =============== Technologies that I must use is WCF and Stored Procedures and Entity Framework to read data out, not for insert, update and delete Tasks =============== Create a combo box with Category, when users change the selection on the combo box, a list of relative subcategories will be shown on a grid. User is able to create a new category directly and input some ...
Started 2 days, 3 hours ago (2009-11-24 00:51:18)
by stanly
Hi friends, I've implement paging in my datalist. I've followed the steps given in this link. http://www.dotnetfunda.com/articles/article456-cus tom-seo-friendly-paging-with-aspnet-repeater-or-da talist-control.aspx . Everything work fine. But i don't know how to pass search parameter to this below stored procedure... Help me friends. CREATE PROCEDURE [dbo] . [LoadDataTest] @...
Started 2 days, 7 hours ago (2009-11-23 20:03:00)
by 482
Hi Gurus.... My problem looks different.....my code was working as anonymous block where as it was not working as stored Procedure Declare cursor c_tblspace is select fs.tablespace_name TBL_SPC_NAME , round((100 *((sum(fs.bytes)) / df.bytes)), 2) PCT_Free from sys.dba_data_files df , sys.dba_free_space fs ,partition_...
Started 5 days, 13 hours ago (2009-11-20 14:41:00)
by dkaiser2222
What I would like to do is (see below) create a stored procedure that will create and return a record if one does not exist. A record will only need to be created the first time a user accesses the application. The problem is that when a record does not exist (and drops into the IF statement) 2 record sets are returned. CREATE PROCEDURE [dbo].[s_get_UserSetting] @UserID int , @...
Started 5 days, 23 hours ago (2009-11-20 04:14:00)
by sonikadugar
IN MySQl Stored Procedure how to pass Parameters with parameter name and values i.e. DELIMITER // CREATE PROCEDURE GetOffice (countryName VARCHAR(255), countryId int(11)) BEGIN SELECT city, phone FROM offices WHERE country = countryName AND country_id = countryId; END // DELIMITER ; CALL GetOffice("India",1); This works fine but i want it the way ...
Started 1 week, 1 day ago (2009-11-17 17:11:33)
by amisu1
Hello This may shound easy question to all of you. One way i know to use sql command, parameter object and set parameter direction to OUT nad retrieve value. But this is different : I have stored procedure like this : -------------------------------------------------- -- ALTER PROCEDURE [dbo].[AddUserRole] ( @iAppid int, @iRoleId int, @sReturnData VARCHAR(...
Started 1 week, 1 day ago (2009-11-18 03:16:09)
by ay1585
Hi All, I have three tables.... say A,B,C. From table A, i am retrieving ID and name by passing SubID(this is a parameter for whole query). I am inserting these values into a temp table and using a while loop because by passing each ID(nothing but value retrieved) of temp table I need some data from Tables B and C. For one particular ID of temp table, I need all records from table B and C. ...
Started 1 week ago (2009-11-18 20:26:00)
by oscarfh
Hello, I am trying to compute the fibonacci sequence using recursive stored procedures. I am trying to call my procedure recursively, I can call it but I don't know how to get the output value. This is my procedure: Code: CREATE PROCEDURE fib(IN i INTEGER, OUT fib BIGINT) BEGIN DECLARE sql VARCHAR(200); DECLARE aux1 BIGINT; IF i=0 OR i=1 THEN SET ...
Started 1 week ago (2009-11-19 03:02:00)
by ramyaJohn
Hi I have created one stored procedure create or replace PROCEDURE TEST1 ( PreDefinedTerms IN XMLTYPE ) IS ContractNumber NUMBER :=0; BEGIN --- inserting management contract SELECT MAX(management_contract_id)ContractNumber INTO ContractNumber FROM management_contract; -- inserting predefined terms INSERT INTO management_contract_terms ( ...
Started 6 days ago (2009-11-20 03:51:24)
by Ehsan_aiub
Hey, I am facing an interesting problem. I have written the following xquery and its executing perfectly. But I can't use the same XML variable for the second sql statement; even the same xquery that executed above, is given empty result. I believe I might need to reset the reader seek pointer or something else. Can anybody help me on this please? Here is the code: Source declare @...
Started 6 days, 11 hours ago (2009-11-19 16:09:05)
by Craigmeister68
I have constructed a multi-parameter search page using gridview and a stored procedure. When I try to add a date range as a procedure, I get a strange error. Conversion failed when converting the nvarchar value 'Return to ' to data type bit. Stack Trace: [SqlException (0x80131904): Conversion failed when converting the nvarchar value 'Return to ' to data type bit.] My stored ...
Started 4 days, 20 hours ago (2009-11-21 07:41:00)
by persistentDeveloper
I have stored procedure for searching Database and return results. Passing parameters to stored proc from code behind page. Now, i have to add a drop down list to the search form with 3 List Items in it. Male Female Both In the database table(where i need to search in) data is stored as below(of course lot more records exist). Name Male Female John...