stored-procedures Questions
8
I'm trying to use a procedure (no parameters) to drop all of the user-created database objects located within the schema from where the procedure is launched, but I'm really not sure on how to go a...
Willtrude asked 9/5, 2009 at 2:19
6
Solved
I am trying to access the return value of a stored procedure with Linq
DECLARE @ValidToken int = 0 //I have also tried using a bit instead of an int here.
IF EXISTS(SELECT 1 FROM Tests WHERE Tes...
Perambulator asked 17/4, 2013 at 11:22
12
Solved
@RowFrom int
@RowTo int
are both Global Input Params for the Stored Procedure, and since I am compiling the SQL query inside the Stored Procedure with T-SQL then using Exec(@sqlstatement) at the ...
Hakenkreuz asked 24/8, 2011 at 20:39
2
Solved
How can I get compiled Mysql stored procedures from their physical location?
Piave asked 22/12, 2009 at 12:55
6
Solved
What SQL would I need to use to list all the stored procedures on an Oracle database?
If possible I'd like two queries:
list all stored procedures by name
list the code of a stored procedure, gi...
Erine asked 5/6, 2009 at 13:44
14
Solved
I want to insert data into my table, but insert only data that doesn't already exist in my database.
Here is my code:
ALTER PROCEDURE [dbo].[EmailsRecebidosInsert]
(@_DE nvarchar(50),
@_ASSUNTO...
Renown asked 7/1, 2014 at 12:30
10
How can I show the code of a function, procedure and trigger in PostgreSQL? Please let me know if any one know the query to show the code of them.
Hypotrachelium asked 1/8, 2011 at 12:32
13
Solved
How do you view a stored function or procedure?
Say I have an old function without the original definition - I want to see what it is doing in pg/psql but I can't seem to figure out a way to do tha...
Unrivaled asked 19/8, 2010 at 18:11
2
I am writing a trigger where I need to convert NEW row into a json and insert into an other table. I am not getting it right.
CREATE OR REPLACE FUNCTION public.eventlogs_add_user()
RETURNS trigg...
Wreath asked 30/3, 2017 at 10:18
8
I'm trying to set up a Stored Procedure as a SQL Server Agent Job and it's giving me the following error,
Cannot bulk load because the file "P:\file.csv" could not be opened. Operating system err...
Determinable asked 21/10, 2013 at 10:17
6
Solved
There are two stored procedures which has same name and same logic. But in different databases. Only some of the content names are different (example - Synonym Name, Table Name, schema). Other code...
Soul asked 30/7, 2015 at 6:46
5
I have a procedure which updates some records. When I execute it I get the following exception
"String or binary data would be truncated.\r\nThe statement has been terminated."
I could found...
Ballplayer asked 11/1, 2017 at 7:5
3
Solved
I'm trying to pass an array of (varchar) data into an Oracle procedure. The Oracle procedure would be either called from SQL*Plus or from another PL/SQL procedure like so:
BEGIN
pr_perform_task('...
Aristophanes asked 21/5, 2010 at 21:5
3
Solved
Maybe it's not new case, but I'm stack about it. This is the procedure that I use to run query, it run normally in MySQL, but not in PostgreSQL and I don't know how to do that. The procedure(in MyS...
Blackandwhite asked 29/3, 2018 at 3:54
3
How to create two VARIADIC parameters. Look at my code and correct me.
CREATE OR REPLACE FUNCTION ip_source_test(
text, text, date, date, VARIADIC int[], VARIADIC text[]
)
RETURNS TABLE (no_docume...
Cerveny asked 9/10, 2013 at 14:42
7
Solved
I'm looking at MySQL procedures and functions. What is the real difference?
They seem to be similar, but a function has more limitations.
I'm likely wrong, but it seems a procedure can do everythin...
Lalitta asked 19/9, 2010 at 1:43
6
Solved
Im working on a SSRS / SQL project and trying to write a query to get the gaps between dates and I am completely lost with how to write this.Basically we have a number of devices which can be sched...
Hugely asked 7/3, 2012 at 15:36
2
Solved
Everywhere I look it seems MySQL stored procedures can do transactions. Yet when I declare my stored function
create function test( a int )
returns int
MODIFIES SQL DATA
BEGIN
START TRANSACTION ;
...
Tournai asked 6/6, 2013 at 18:49
1
I'm trying to rollback the local variable v1 from 5 to 2 with ROLLBACK statement in my_proc() procedure but v1 is not rollbacked keeping 5 as shown below:
DELIMITER $$
CREATE PROCEDURE my_pr...
Decani asked 16/12, 2023 at 23:18
5
Solved
The basic structure of my procedure is:
BEGIN
START TRANSACTION;
.. Query 1 ..
.. Query 2 ..
.. Query 3 ..
COMMIT;
END;
MySQL version: 5.1.61-0ubuntu0.11.10.1-log
Currently, if 'query 2' fa...
Favela asked 2/4, 2012 at 9:58
2
Solved
As the title says, are procedures atomic in MySQL? i.e. would something like
for (..)
<check_if_row_has_flag>
for (..)
<update_row>
work atomically?
Interestingly, I couldn't find mu...
Anson asked 28/6, 2018 at 23:44
2
Solved
I'm trying to create the following stored procedure in phpMyAdmin. But, I keep getting this error: #1313 - RETURN is only allowed in a FUNCTION
CREATE PROCEDURE IS_POINT_IN_POLYGON()
BEGIN
DECLARE ...
Sherrer asked 26/8, 2011 at 1:22
6
Is there a way to find what stored procedures create an entry in a table. Say for example:
Stored Procedure A inserts into Table A
Stored Proceudre B Inserts into Table A
Stored Procedure C Insert...
Rehnberg asked 9/9, 2011 at 15:6
4
If a procedure fails in middle, are changes at that point from the beginning of SP rolled back implicitly or do we have to write any explicit code to make sure that SP runs in a transaction only?
Platonism asked 31/1, 2015 at 10:2
35
How do I do a SELECT * INTO [temp table] FROM [stored procedure]? Not FROM [Table] and without defining [temp table]?
Select all data from BusinessLine into tmpBusLine works fine.
select *
into t...
Ingenerate asked 17/3, 2009 at 10:45
© 2022 - 2025 — McMap. All rights reserved.