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
12
votes
2 answers

Prolog: Making a procedure to print Hello World

I want to load this simple something into my Editor: Write:-repeat,write("hi"),nl,fail. So that it prints "hi". What should I do? I'm currently trying to do File->New and Saving a file named Write into E:\Program Files\pl\xpce\prolog\lib When doing…
andandandand
  • 21,946
  • 60
  • 170
  • 271
12
votes
2 answers

Delphi callbacks?

I would like to know if it's possible to implement something like this: procedure waitandcall(time,@MyProcedureOrFunction) which execute the function or procedure I've created ? I'm not sure if they are called callbacks.
ELCouz
  • 572
  • 2
  • 6
  • 17
12
votes
3 answers

Can an SQL procedure return a table?

Can an Oracle SQL procedure return a table? I'm currently using a dbms_output to print out the outputs of two cursors which are in a loop, although this would look nicer if it was returning two columns instead. Would that be possible within a…
Jaqualembo
  • 201
  • 1
  • 4
  • 14
12
votes
6 answers

set serveroutput on in oracle procedure

I've created a simple procedure. In this procedure i want to output some data. However where ever i put set serveroutput on it says Error(26,5): PLS-00103: Encountered the symbol "SERVEROUTPUT" when expecting one of the following: . ( ) ,…
bicycle
  • 8,315
  • 9
  • 52
  • 72
11
votes
4 answers

measure time of an sql statement in a procedure in plsql

I must write a procedure which save the execute time of any sql-statement in a table. The procedure is calling by exec measuresqltime('sql statement as string'); My idea is like this: --declarations timestart NUMBER; BEGIN …
sheepy
  • 111
  • 1
  • 1
  • 3
11
votes
2 answers

Problem with execute procedure in PL/SQL Developer

I this is my first attempt to create procedure and execute it. First I create simple table. DB scheme of table is here: Table name: Ziaci Columns: ZiakId - primary key, number Surname, varchar2 FirstName, varchar2 TriedaId - forgein key,…
user572844
11
votes
2 answers

Can I execute a procedure with default null parameters?

I recently created a procedure that is defined like this: create or replace PACKAGE pkg_dml_legal_transactions AS PROCEDURE spm_update_court_cost( p_court_state IN legal_court_cost.state%TYPE, p_tran_code IN…
user2405778
  • 467
  • 6
  • 16
  • 29
10
votes
9 answers

How to get a table of dates between x and y in sql server 2005

I just want a quick way (and preferably not using a while loop)of createing a table of every date between date @x and date @y so I can left outer join to some stats tables, some of which will have no records for certain days in between, allowing me…
digiguru
  • 12,724
  • 20
  • 61
  • 87
10
votes
3 answers

What is a Re-entrant procedure?

What is a re entrant procedure and can you give an example scenario of when it is used? Edit: Also, can multiple processes access a re entrant procedure in parallel? Please provide a different way of explaining than wikipedia as I don't totally…
rrazd
  • 1,741
  • 2
  • 32
  • 47
10
votes
2 answers

Mysql Create Insert Procedure Statement incomplete

I'm trying to wirte a little log procedure for my database. I create a procedure with this statment: create procedure prc_wirte_log ( in p_schema varchar(255), in p_item varchar(255), in p_message varchar(255) ) begin insert into…
Markus
  • 1,909
  • 4
  • 26
  • 54
10
votes
1 answer

Which is the diffeence between an INTERFACE block and a MODULE procedure in fortran?

I'm a bit confused about the use of an interface block inside a module and the use of the CONTAINS statement to create an "explicit interface" for a procedure inside a module. I usually write a procedure using an interface block inside a module. For…
Granados
  • 117
  • 1
  • 7
10
votes
5 answers

Show procedure/function code in MySql

Is there any options to view stored procedure/function code in MySql same as like "sp_helptext procedurename" in sql?
User129
  • 129
  • 1
  • 1
  • 9
9
votes
2 answers

Tricks on how to execute string inside a function in Sql Server

Procedure FunctionX, Line 345 Invalid use of a side-effecting operator 'EXECUTE STRING' within a function. I get the above error when I execute a dynamic statement inside a function in SQL Server 2012. Is there a workaround for this? Any tricks?…
JD123456
  • 147
  • 1
  • 3
  • 8
9
votes
4 answers

PL/SQL: how do I prompt user input in a procedure?

This is a question about a small part of a large project I'm doing. I tried the following but I just get the two errors below it: SET SERVEROUTPUT ON CREATE OR REPLACE PROCEDURE HELLO AS DECLARE variable1 NUMBER(1); variable2…
user3120554
  • 641
  • 2
  • 11
  • 21
9
votes
2 answers

does mongodb have the properties such as trigger and procedure in a relational database?

as the title suggests, include out the map-reduce framework if i want to trigger an event to run a consistency check or security operations before a record is inserted, how can i do that with MongoDB?
user3236929
  • 123
  • 1
  • 2
  • 7