Questions tagged [procedures]
262 questions
0
votes
1 answer
Getting incorrect output in below PL/SQL Proc
CREATE OR REPLACE PROCEDURE Proc_TEST(T_DATE DATE DEFAULT TRUNC(SYSDATE))
AS
PREV1 VARCHAR(20);
mnth VARCHAR(20);
BEGIN
SELECT TO_CHAR(TO_DATE(TRUNC(T_DATE,'MM')-1),'MON_YYYY') INTO PREV1 FROM DUAL;
FOR i IN 1 .. 3 LOOP
mnth:='PREV'||i;
…

Arihant Rakecha
- 11
- 2
0
votes
1 answer
How do I fix this error:' Illegal identifier?'
I have recently attempted creating a basic caesar-cypher in pascal (using lazarus as my compiler). My aim was to set the numbers as the array and then declare all the numbers as letters so that when i run the code it should scramble or 'encrypt' the…

H. khan
- 3
- 2
0
votes
0 answers
Passing parameters from one procedure to another
A question regarding stored procedure in oracle.Consider there are two procedures A and B, Procedure A computes and provides a certain number of rows, think it is kind of result set.I need to pass all these rows to Procedure B as input.Can I do this…

Dark Knight
- 11
- 2
0
votes
0 answers
Returning rows of data from called stored procedure using cursors
I am attempting to write an Oracle stored procedure that will call five (5) sub-stored procedures for all of the Bill's (bill_id_tab) in a particular result set. I am using a FOR loop, and the only set of data being returned is the very last Bill. I…
0
votes
5 answers
PL/SQL Procedure error with exception
I have table named "players" like this
Name Country
---------- ------------
Sachin India
Ponting Australia
I have written a PL/SQL Procedure to execute it by giving "name" as parameter.
Here is the code-
CREATE OR REPLACE…

Warrior92
- 1
- 2
0
votes
1 answer
Reusable Code Chunks - Ruby Blocks, Procs, Lambdas
New to ruby. Wrote a program now trying metaprogramming. As you can see i have the code below. Have marked common statements. How do I write these in one place and use them again and again.
The statements are part of a loop. So its like I just want…

Kapil Aggarwal
- 95
- 1
- 9
0
votes
2 answers
What are PERSISTENT Procedures in Progress 4GL?
I want to know what is exactly happening in the following code bit,
IF THIS-PROCEDURE:PERSISTENT
THEN
DELETE PROCEDURE THIS-PROCEDURE.
Actullay I have to fix a bug in a kind of complex old-coded Progress GUI application. Breifly the…

Ravinath
- 65
- 2
- 14
0
votes
1 answer
Insert transaction if not exists in SQL Server
I want to insert in the table only if I do not have the specific column it is a track table with different titles and I want to add different titles with one procedure I did the try catch and I have problem in my where not exists condition, I don't…

Nickool
- 3,662
- 10
- 42
- 72
0
votes
2 answers
Clear the result set in a MySQL procedure
I want to define a MySQL stored procedure, which returns data in the result set. Sometimes, I want to return nothing (ie, zero rows).
How can I do this? SELECT; is invalid, and SELECT NULL; returns a record with a NULL value. How to select an empty…

galinette
- 8,896
- 2
- 36
- 87
0
votes
2 answers
MySql update procedure error
I have problem with my update query. I need to make it works :P
That procedure select all duplicated records ( need to be recreated to select and update value)
DELIMITER $$
USE `bgw_r`$$
DROP PROCEDURE IF EXISTS `tpl_pobierz_dodane`$$
CREATE…

Rafał Figura
- 5,428
- 1
- 15
- 20
0
votes
2 answers
Scheduling procedures in mongoDB in Windows
How can I create a mongodb procedure that can be scheduled to run once every day, at a fix time, say sharp at midnight GMT?
This google group link says you cannot schedule a task in mongoDB, they have a Jira for this, but you can use Window Task…

Vivek Vardhan
- 1,118
- 3
- 21
- 44
0
votes
1 answer
Procedures and lambda
(define (p-cons x y)
(lambda (proc) (proc x y)))
(define (p-car proc)
(proc (lambda (p q) p)))
> (p-car(p-cons "foo" "bar"))
"foo"
How does this piece of code work?
This is a "homemade" version of cons and car in scheme.
I can't seem to…

John NG
- 29
- 1
- 5
0
votes
1 answer
How can I update and replicate one column from one table to another column from another table?
I need to replicate one column (TYPE) from one table (CUTOMER) to another column (UNDEF000) from table (ORDERS), by this way everytime when someone update column(TYPE) to be automaticaly replicated on (UNDEF000), Table CUSTOMER and ORDERS are linked…

Papuc Viorel
- 1
- 1
0
votes
1 answer
Run multiple procedures at the same time in netlogo
Hello i have the following code:
to go
move
play-papelvstije
play-papelvsrock
play-tijevsrock
play-tijevspapel
play-rockvspapel
play-rockvstije
…

Paul
- 189
- 6
0
votes
4 answers
How do I fix this VB code? [Argument not specified for parameter]
I'm struggling to get this code to work:
Module Module1
Function BMI(ByVal H, ByVal W)
BMI = (W / H) ^ 2
Return BMI
End Function
Function reading(ByVal BMI)
If BMI <= 19 Then
reading = "Underweight"
…

Ryan Grainger
- 21
- 1
- 5