I have two tasks and since I am new to it, I need some help/advice from the masters.
What I need to do is send the result of q select query to a csv file which can have delimeter as comma or tab and then send this file as mail to a particular receipient.
Hoping for some great advice
...
Is it good design to throw exceptions from SQL CLR stored procedures? Since we are in the context of SQL Server, do any special considerations need to be made?
Is this bad design?
[Microsoft.SqlServer.Server.SqlProcedure]
public static void MyStoredProcedure(string foo)
{
if (string.IsNullOrEmpty(foo))
{
throw new Argum...
Hi again,
I have a sequence table with two columns, name, value, and I have a stored procedure for incrementing the value provided the name
DROP PROCEDURE IF EXISTS p_generate_sequence;
delimiter |
CREATE PROCEDURE p_generate_sequence (name VARCHAR(30))
BEGIN
START TRANSACTION;
-- Variable "name" equal to column "name", how to ...
For an instance I a select statement and it is returning 1000 rows. I need to execute a particular stored procedure for every row the the select statement is returning.
have you got any idea how can I do that?
...
(ASP.net 3.5, C#, SQL Express 2008)
I want to have a Web Form, where I can search for "Solutions" (my table) using a keyword entered by the user and after the result comes back and populates a GridView.
I already have parts of this search via a stored procedure that is hooked up to my Entity Data Model. On this page I have an EntityDa...
Title says it all - is it possible to do this? I have some filters set in my source Stored Procedure and I really don't want to have to duplicate it in another just to get the rowcount.
...
Hello all,
I am using oracle database 10g. I have to write a java stroed procedure through which i can call a file at the server and store it locally at the users machine. Im using oracle Apex 3.1.1.
...
What are some pros and cons of using linq over stored procedures?
...
I am writing stored procedures for several operations in a database, I just wanted to know:
Is it better to design a single procedure for a table which can perform add, modify, delete operations or...
Should I design seperate procedures for each operations
Which approach would be better?
...
I am trying to create a stored procedure in my mysql database usin the below code.I am getting an error.Please help me to solve
My MySQl version is 5.0.51b
CREATE PROCEDURE tv_insert_user(IN firstName VARCHAR(25),
IN lastName VARCHAR(25), IN emailId VARCHAR(22),IN countryId INT,IN stateId INT)
BEGIN
INSERT INTO tv_user_master(FI...
select * from (EXEC sp_SomeStoredProc)
If you can't do this then what is stopping it from being added to the SQL standard or T-SQL?
...
Hi,
I have a problem executing oracle procedures from Visual Studio 2008's Server Explorer,
when i try to execute a procedure all the input parameters are doubled!
it only happend to me in one workstation, i've tried to reinstall oracle products,
but it doesn't helped me...
i get the following error message when i try execute the pro...
I get "Incorrect syntax" errors on every nested IF and ELSE statements in the following code... what's wrong ?
ALTER PROCEDURE [WTFAULT].[usp_WTFault_GetPartFaultStatus]
(
@linxPartId int = -1,
@faultStatus varchar(10) output
)
AS
BEGIN
DECLARE @NbFaultsInParts int,
@NbPartsReturned int
SET @NbPartsReturned = (SELECT COU...
We have a Legacy system that contains a number of stored procedures that we'd like to expose to other applications as web services. We are building the web services with JBoss. The stored procedures can run from Oracle, DB2 or MS SQL Server databases.
JDeveloper has a wizard to generate the stubs and deploy to an ear file that would ru...
I have below stored procedure to check the user name availability
DELIMITER $$;
DROP PROCEDURE IF EXISTS tv_check_email$$
CREATE PROCEDURE tv_check_email (IN username varchar(50))
BEGIN
select USER_ID from tv_user_master where EMAIL=username;
END$$
DELIMITER ;$$
when i run this from my mysql front end tool, it is working fine
cal...
Dear all how can I see the list of the stored procedures or stored functions in mysql command line like show tables; or show databases; commands.
...
I have the following issue: when a stored proc is called from my application, every now and then (like 1 time out of 1000 calls), it takes 10-30 seconds to finish. Typically, the sproc runs in under a second. It's a fairly simply proc with a single select that ties together a couple of tables. All the table names are set with a (NOLOC...
From a stored procedure or function in a given MySQL database, is it possible to reference a stored procedure or function in another MySQL database, as follows?
SELECT
some_table.field1,
some_table.field2,
another_database.STORED_PROCEDURE(arg),
...
FROM ...
WHERE ...
...
I have a products table. Each row in that table corresponds to a single product and it's identified by a unique Id. Now each product can have multiple "codes" associated with that product. For example:
Id | Code
----------------------
0001 | IN,ON,ME,OH
0002 | ON,VI,AC,ZO
0003 | QA,PS,OO,ME
What I'm trying to do ...
hi all,
I m having a stored procedure which returns two result sets based on the success or failure.
SP sucess result set: name, id ,error,desc
SP failure result sret: error,desc
I m using the following query to get the result of the stored procedure .It returns 0 for success and -1 for failure.
declare @ret int
DECLARE @tmp TABL...