Questions tagged [procedures]

262 questions
0
votes
1 answer

Creating dynamic parameter stored procedure

Is it possible to create a dynamic value that can hold any data type value in stored procedures in firebird? Something like: SET TERM ^ ; CREATE PROCEDURE something(variable_a dynamic) RETURNS (status int) AS BEGIN -- .... END^ SET TERM ;…
user7500570
0
votes
0 answers

configure store procedure in mysql with IF ELSE

I am trying to create a procedure that will insert two columns into a table. I need to create a procedure that I could use in vb.net for creating mailboxes The procedure that I created is: PROCEDURE 'create_mail' (IN em VARCHAR(20),IN pas…
Ilya Y
  • 1
0
votes
1 answer

Functions vs Sub Procedures

I am new to vbscript and trying to use the below code with a Function and then a Sub Procedure. I am confused as to why I have to "call" the function as it should itself return the value without calling the function. Please see the below pieces of…
0
votes
0 answers

Postgres triggers that notify and then listen for a response on a channel?

I'm looking for a way to do a request response pattern inside a trigger. This would be used to perform additional (more complex) data validation. More concretely, something like this: CREATE OR REPLACE TRIGGER create_user BEFORE INSERT ON users …
Matt
  • 22,224
  • 25
  • 80
  • 116
0
votes
1 answer

MySQL Call Stored procedure from another stored procedure

Sorry for long POST: Is it possible that I can call a Stored Procedures from another Stored procedure in MySQL. For example: I have two tables (test and testcomp): With the structures below: -- Table structure for table test CREATE TABLE IF NOT…
0
votes
1 answer

Affecting different Procedures by changing values

I have this master procedure that calls other procedures. But at two places, I need to check that all values are correct. If they are not, I want this master procedure to quit. What I am trying to do is check the values in my sub procedures and if…
Totos
  • 31
  • 1
  • 4
0
votes
1 answer

Mysql procedure to modify limit and offset

Just a thought in my mind but would it not be possible to createa function in MySQL that can modify the LIMIT within a query The clause would be a simple calculation function that would work out the offset depending on the pageno *…
RobertPitt
  • 56,863
  • 21
  • 114
  • 161
0
votes
1 answer

How to access variables from a procedure outside of the procedure

{ static int[] location = { 0, 0 }; static int player = 0; static void runGame() { int start = Convert.ToInt32(Console.ReadLine()); if (start == 1) { location1(); } else if (start == 2) { location2(); …
0
votes
1 answer

Parameter Sniffing Not working

I am using MSSQL. I have a stored procedure which works fine for couple of days and later on it becomes slow. I came to know that Parameter Sniffing will work for it. How ever after implementing it it became slow for ever. I also tried to…
Hemal
  • 124
  • 1
  • 13
0
votes
1 answer

It doesn't execute my update query

I have this procedure called updates: DROP PROCEDURE IF EXISTS `updates`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `updates` (IN `ids` INT(11), IN `name` VARCHAR(20), IN `ape` VARCHAR(20), IN `pass` VARCHAR(20), IN `dpto` VARCHAR(20), IN `rols`…
0
votes
2 answers

Python how to use inputs from sub routines in another sub routine

I have a problem to solve in Python whereby the user inputs variables such as number of items they want to buy. I've got this as a def customer, with an output 'how many widgets would you like' and then their input multiplied by a price of say £10.…
A.Teacher
  • 11
  • 3
0
votes
1 answer

insert a count procedure in mysql

I have this procedure and can run it normally , but do not know how to put a count on it , now it behind me a report line by line and I need to download the spreadsheet to count rs lines How can I make her bring me a Count of this report? DROP…
Paulo Roberto
  • 1,498
  • 5
  • 19
  • 42
0
votes
2 answers

Unable to get user input in PL in sqldeveloper

I'm trying to get user input in SQLDeveloper in a procedure. But however , I'm getting some error like "missing defines". Please help me to solve this. Thanks in advance. DECLARE a NUMBER(5); BEGIN a := :a; DBMS_OUTPUT.PUT_LINE('We took the…
lu5er
  • 3,229
  • 2
  • 29
  • 50
0
votes
0 answers

Stored Procedures and Functions in PostgreSQL

There are two tables, User (int id) Message (sender_id, adresee_id). The table reports the two foreign key one of which shows the sender and the other on the recipient of the message. How to set up the function, the procedure and Triger, so that…
Artem
  • 1
  • 1
0
votes
0 answers

Dbms_Output.Put_Line not printing inside inner functions/procedures

I am running a PL/SQL anonymous block on SQL developer that calls some functions /procedures (which in turn call other functions/procedures) .... the outer block contains some Dbms_Output.Put_Line statements as well as the called…
osama yaccoub
  • 1,884
  • 2
  • 17
  • 47