Questions tagged [procedures]
262 questions
0
votes
1 answer
PostgreSQL Trigger Exception
I'm having problems with creating this trigger in PostgreSQL 8.4.
CREATE OR REPLACE FUNCTION tbi_Usuarios() RETURNS TRIGGER AS $tbi_Usuarios$
BEGIN
IF trim(both ' ' from NEW.Nombre_usuario) = '' OR NEW.Nombre_usuario IS NULL THEN
…

KGs
- 913
- 11
- 19
0
votes
2 answers
mysql commands difference and example
I'm new in mysql language and can not understand difference between procedures and functions, can anyone answer in which case should be use this routines ?
Also have some example => I've table named "data" and columns named "id"(primary key) ,…

DaHaKa
- 161
- 1
- 1
- 6
0
votes
3 answers
MySQL Procedure multiple results
The basic ideea is that when I call a procedure I want to get a set of data not just one value (by setting results to be INT and selection COUNT(id) for instance).
I would like to know how to change this procedure to get multiple values...
DELIMITER…

ka_lin
- 9,329
- 6
- 35
- 56
0
votes
2 answers
SQL procedure to select merge
My procedure is:
create procedure "news"
as
select newsdate,COUNT(B.id) as total from news B
where B.newsyear < GETDATE()
Group by B.newsdate
select newsdate,COUNT(B.id) as total from news B
where B.status='WAITING' and B.cancel='1'
Group by…

bulent
- 3
- 1
0
votes
2 answers
using existing tcl c procedures in tcl script
How to use Tcl_ParseCommand or list of Tcl C procedures already available under "http://tmml.sourceforge.net/doc/tcl/". Do i need to write wrapper c procedure and init procedure for each of these command?
-Prasath

Prasath
- 595
- 5
- 11
0
votes
1 answer
Using like pattern in mysql case statement with two different tables
I have a table with names (names). I have another that holds ids (user).
I have a conditional construct - a case-when statement that is supposed to insert an id into the user table if a name in the names table matches a certain condition.
I have…

watkib
- 347
- 3
- 11
- 25
0
votes
1 answer
attempting to do an update procedure but getting error - PL/SQL: ORA-00933:
create or replace PROCEDURE update_con
(
c_id in lds_consultant.consultant_id%type,
cation in lds_consultant.location%type,
s_area in lds_consultant.specialist_area%type
)
IS
BEGIN
UPDATE lds_consultant
SET
location =…

David
- 1
0
votes
3 answers
I have written a MYSQL procedure and there is mistake in syntax, can't figure out the correct syntax
The MYSQL procedure will
1. Create TABLE1_ARCHIVE similar to TABLE1 if it is not there.
2.Insert the values from the TABLE1 into TABLE1_ARCHIVE based on date condition
3. Delete those records from TABLE1.
Link to the…

heman123
- 3,009
- 4
- 24
- 37
0
votes
1 answer
Declaring variables inside an Oracle procedure
There is some problem with the declaration of mystrtID. I am trying to implement pagination and need to select a range from a starting ID
create or replace procedure GET_WORKFLOW_Range(p_Dataset OUT
…

pchancey
- 19
- 7
0
votes
1 answer
Procedures in c++ w/ SFML don't work properly, movement algorithm
In main loop while( win.isOpen() ) i have 4 if's:
#include
using namespace sf;
int main()
{
RenderWindow win( VideoMode( 1280, 1024, 32 ), "abc" );
View view( FloatRect( 0, 0, 320, 256 ) );
Sprite player;
Texture…

Running_Sloth
- 41
- 7
0
votes
1 answer
How to use procedure pointers for subroutines with different number of arguments
I'm developing a Fortran program for scientific computing. I want to use procedure pointers to assign the boundary conditions in the problem, shown in the following main program
program main
use boundary
implicit none
bc1 => boundaryA
bc2 =>…

zljt3216
- 53
- 1
- 5
0
votes
2 answers
Create mysql procedure
I'm trying to create procedure in mysql database this procedure will move accounts from table to another
this is my procedure but I have error with syntax
CREATE PROCEDURE radius.archive_acct()
BEGIN
INSERT INTO radacctold
SELECT * FROM radacct
…

Muhammad Khaled
- 23
- 1
- 10
0
votes
4 answers
sql server - showing values as different values
I have the following situation in Sql Server:
In a table we have a column that we fill with three possible values 1, 2 and 3. Let's suppose that 1 means yes, 2 means no and 3 means maybe.
Is there a way to select this column showing the values as…

lucas rs
- 13
- 3
0
votes
0 answers
"Exception when others then" ignores if clause?
Hey guys I have this trigger:
create or replace TRIGGER T_MINDESTLAGERMENGE
BEFORE INSERT OR UPDATE ON ET_LISTE
for each row
declare
lagermenge number := 0;
minlagermenge number := 0;
menge_et number :=0;
BEGIN
select count(*) into menge_et from…

TiZaLjubavNisiRodjena
- 117
- 1
- 7
0
votes
2 answers
local procedures in TCL
I'd like to create a procedure that exists only within a scope of a different proc in TCL.I.e. that just 1 proc can call it. Is it possible? According to this following link, no. :http://wiki.tcl.tk/463But maybe someone knows another way to do…

user1134991
- 3,003
- 2
- 25
- 35