Scenario
I have a stored procedure written in T-Sql that I use to insert data into a table as XML.
Since the data gets updated regularly, I want the rows to be updated if they already exist (Aside from when the application is first run, they will always exist).
Question
Below is the code of my Insert Sproc, however I cannot seem to wo...
Is there a way to rename an oracle procedure, without having to drop and recreate the procedure?
...
I was in search of a SQL Script , in order to determine , if there is any data(row count ideally) in any of the tables in a given database.
The idea was to re incarnate the database , in case if there are any rows existing(in any of the database) .
The database being spoken of is SQLSERVER.
Could Someone suggest a sample script.?
th...
My tables have some inner pre-fix that users must not know.
So I made a SP like this to retrieve lines.
CREATE PROCEDURE p_Test
( inStation varchar(10) )
RETURNS
( ServiceName varchar(20) )
AS
DECLARE VARIABLE StationTable varchar(20);
BEGIN
StationTable = 'TSTATION_' || Upper(Trim(inStation));
SELECT Station...
I want to return custom values as the values of the rows in case when no rows are fetched by executing the stored procedure - is there a way to do that?
...
I want my function to only run once. Meaning that if many threads call it at the same time, the function will block all threads apart from one and only allow it to run.
...
how can i get row count values in mysql as @@ROWCOUNT in mssql
...
I want to return custom values as the values of the rows in case when no rows are fetched by executing the stored procedure
How do i do that?
...
I need a solution for an enterprise environment with 100s of applications and SQL databases. A current architecture standard requires that all applications implement DALs using SPROCs. One reason for this is that, when performing ongoing migration, obsolescing or modifications to databases, dependency graphs between these SPROCs and data...
In a large project relying on SQL Server stored procedures and classic ADO.NET (DataSets, DataAdapters) after INSERT, DELETE and UPDATE procedures there is a SELECT following. In code, all the methods return void, is this SELECT of any relevance - what effect does in have? What is the performance impact of the SELECT?
...
Hello!
I´ve got a problem when using LINQ to execute a stored procedure and return its values. One of the column that the stored procedure returns is of datatype image and contains a pdf in binary form.(this because the database is deployed on sql server 2000, otherwised i would choose a blob)
When including the stored procedure in my ...
I have a problem with this one stored procedure that works 99% of the time throughout our application, but will time out when called from a particular part of the application.
The table only has 3 columns and contains about 300 records. The stored proc will only bring back one record and looks like this
"Select * from Table Where Col...
Is is possible to restrict a stored proc to only SELECT from a database.
I want a stored proc which only selects data to execute correctly and a stored proc with UPDATE, CREATE, DELETE operations to return an error indicating insufficient permissions.
I am using Sybase 12.5
...
Hello im having a hard time with this stored procedure. im getting the error:
Result consisted of more than one row.
here is my stored procedure:
DELIMITER $$
DROP PROCEDURE IF EXISTS `dss`.`COSTRET` $$
CREATE DEFINER=`dwadmin`@`192.168.%.%` PROCEDURE `COSTRET`( TDATE DATE)
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE ls_id VARC...
Hi there im just new here and i have a question regarding my error on mysql it said
Result consisted of more than one row. I have no idea how to solve this your help is much appreciated!
DELIMITER $$
DROP PROCEDURE IF EXISTS `dss`.`COSTRET` $$
CREATE DEFINER=`dwadmin`@`192.168.%.%` PROCEDURE `COSTRET`( TDATE DATE)
BEGIN
DECLAR...
my practice is that i fill use databinded listboxes and using a tablebindingsource and tableadapter. Then to get selective records in listbox i build stored procedure and select required records.
But now i want that the stored procedure must take some parameter from some textbox value.
like i to implement the following query
string q...
How do you assign the result of an exec call to a variable in sql? I have a stored proc called up_GetBusinessDay, which returns a single date. Can you do something like this:
exec @PreviousBusinessDay = dbo.up_GetBusinessDay @Date, -1
Thanks.
...
I've got an application that generates data for reports that look like:
age < 30 | age >=30 | asian | hispanic
-----------------------------------------------------------------
clients in prog A | | |
-----------------------------------------------------------------
clients in p...
Using Subsonic 3.0.0.3 is it feasible to pass a null value to a stored procedures parameter? If so, what is the appropriate way?
Details
Say I have an sp where one of the parameters has a default value like:
CREATE Procedure Test_SPWithNullParams( @p1 int=null, @p2 varchar(50) )
AS
SELECT 1 as Stuff
Then in my code I want to...
I have a table, a simple table, only has 3 fields.
ID Type Date
Example of Data (recordset showing 3 of 300)
154 | page | 2010-02-08
154 | link | 2010-02-08
154 | form | 2010-02-08
Id: just an id for a client
Type: can only be 3 things that are already populated ('form','page','link')
Date: just the date it was cr...