Questions tagged [procedure]

A procedure is a subroutine that does not return a value. Do not use this tag for stored procedures. Use 'stored-procedures' tag instead.

A procedure is a subroutine that does not return a value.

Do not use this tag for stored procedures.
Use tag instead. If question is about stored procedures in Oracle then you can also use tag.

2740 questions
0
votes
2 answers

Assembly:Is there any advantage of passing arguments to a function in using stack?

I was wondering if there was any advantage of passing arguments to functions using stack, in assembly language. Here is what I mean: readString PROTO :DWORD ;Prototype for function ;Now we call the function by moving a DWORD value into eax and…
devjeetroy
  • 1,855
  • 6
  • 26
  • 43
0
votes
1 answer

how to add a parameter in this i.e if I am asked to add parameter in this sql code , pls guide?

CREATE OR REPLACE PROCEDURE DEL_VEN_PROC( ERRBUF VARCHAR2, ERROUT VARCHAR2, p_from_period varchar, p_to_period varchar )
Komal
  • 1
  • 1
0
votes
1 answer

Using in paramenter in subquery?

Is posible to using in paramenter in subquery? I'm trying to join three table, and using paramenter in subquery, but I'm getting error: drop procedure if exists displayFilmInfo; delimiter // create procedure displayFilmInfo(in in_category_id…
dinosaur
  • 169
  • 1
  • 9
0
votes
1 answer

Why can't get right logical query for the if statement in mysql procedure?

Query all data when year is 18: SELECT * from tb where year=18 // +----+------+------+------+ | id | name | year | num | +----+------+------+------+ | 2 | a | 18 | 400 | | 4 | b | 18 | 200 | | 6 | c | 18 | 100…
user7988893
0
votes
1 answer

What is the matter with if statement in procedure?

It is simple to write a sql procedure. demiliter // create procedure show_growth() begin SELECT * from tb; end // I want to add a if statement in the procedure. Drop it first. drop procedure show_growth // Then create a new one. create procedure…
user7988893
0
votes
0 answers

Session Date Format in DB2

I've a doubt about session-level date format in DB2. I'm doing a migration project from Oracle to DB2 and I came across with a procedure in oracle that is using "alter session set nls_date_format = 'yyyymmdd'", when I execute this, the session that…
0
votes
1 answer

Anchor row data type variable from declare cursor

How can I declare variable using anchor data type (row) from a declared cursor in db2? create or replace PROCEDURE "SP_ATUALIZA_ID_DISTRIBUIDOR_FT" BEGIN DECLARE C_ID_DIST_ERRADOS CURSOR FOR SELECT DISTINCT …
0
votes
2 answers

This is a procedure to update multiple table's data in oracle , as compiler is showing Error: ORA-00922: missing or invalid option error

This is a procedure to update multiple table's data in oracle , do not know where i am getting wrong as compiler is showing Error: ORA-00922: missing or invalid option error please help I have checked the syntax I think it is correct . create or…
MAHENDRA
  • 1
  • 2
0
votes
1 answer

PostgreSql procedure return query has no destination for result data

I am building a procedure, which is called by a trigger, after an insert, and an error is occurring when I use a select statement in its body. When I do NOT use select, to get a value, there is NO error when the trigger calls this…
Antonio José
  • 473
  • 2
  • 5
  • 14
0
votes
1 answer

implementing horizontally fragmented tables in pl/sql procedure

I have two tables.account on server and account1 on site , which have same attributes but different data. CREATE TABLE ACCOUNT ( Accno int, Balance int, Acctype varchar2(20), Accbranch varchar2(20), PRIMARY KEY(Accno)); CREATE TABLE ACCOUNT1…
0
votes
1 answer

Call view from Stored Procedure

I have a user VIEW, let's call it [MIKE].Table wich does a filtered select SELECT * FROM TABLE WHERE TL_FILTERKEY in (1,2,3) So, if Mike connects to the server and executes "SELECT * FROM TABLE" he will see only part of the data from table. There…
Artur A
  • 7,115
  • 57
  • 60
0
votes
2 answers

How to Declare table to variable in MARIADB/MYSQL for function/procedure?

I don't know how to operate MySQL DECLARE THIS TABLE? MS_SQL CAN DECLARE @TEMP TABLE (variable INT) But MySQL can't do this! How can i do it? Syntax error !!
Kim
  • 1
  • 1
  • 2
0
votes
1 answer

How to make trigger to "see" some default value even if it's not inserted yet in table?

Is it possible, and how, to do a Oracle trigger "to see" some default value in column even if it´s not inserted yet? Mean, if :old is for update and :new is for insert and in this case I need to "cheat" trigger to believe something was inserted…
0
votes
2 answers

How can I call a procedure declared inside another procedure?

I have a doubt regarding procedures in Db2. I created a stored procedure using "CREATE PROCEDURE", and inside that I have another which is declared using "DECLARE PROCEDURE". But, this procedure created by declare, cannot be called using…
0
votes
1 answer

SQL Performance with varchar(max) parameters

I have two varchar(max) parameters in a SQL Stored Procedure. One of which is a readable string generated in C# that is provided to the user to display what values for a particular record have changed. The other, is an XML representation of the…
Rusty
  • 1
1 2 3
99
100