Questions tagged [procedures]

262 questions
5
votes
1 answer

TCL- How to interpret a string as multiple arguments in tcl procedures?

I have a procedure that needs to accept a set amount of parameters to make arrays. I have a csv file with the information for the parameters on each line. Using the command [split $line ,], returns the information with spaces in between except that…
Harrichael
  • 95
  • 1
  • 9
4
votes
1 answer

How does DispatchMessage decide which WndProc to use?

I'm going through some code for an open source project and this is my first time dealing with a Win32 app (mostly did console stuff). I see that several functions within the code are windows procedures because they return LRESULT CALLBACK. Is there…
Chaos Fighter
  • 41
  • 1
  • 4
4
votes
2 answers

Writing to Stack in Extern 8086 Procedure is inactive through MOV [BP] ,AL

Problem : Inactive write to stack inside an external procedure Code : Inside an extern procedure which asks the user to input a string then returning it to the main through the stack. String is defined at the data segment with a name different than…
4
votes
2 answers

Not able to drop the procedure

I have created a function and procedure, the function is called in the procedure. According to the output of the function, in procedure I'm inserting data into some other table. Now that procedure is not executing nor getting dropped. If i try…
Naveen
  • 403
  • 1
  • 6
  • 20
4
votes
2 answers

why do we need nested procedures in tcl

Hi i have been working with tcl scripting for almost a year and now understand almost basics of it completely. But today i just came across nested procedures which is kind of strange as i did not get the use of it. Anyways, i read about nested proc…
Puneet Mittal
  • 532
  • 1
  • 15
  • 24
3
votes
3 answers

postgresql procedures/triggers

Is it possible to write a stored procedure or trigger that will be executed automatically inside of a database on particular time without any calls from application? If yes, then could anybody give me an example or link to some resource where I can…
Nurjan
  • 5,889
  • 5
  • 34
  • 54
3
votes
1 answer

MySQL How to get results after PREPARE and EXECUTE in Stored Procedure?

My current code is : DELIMITER \\ CREATE PROCEDURE sample (IN _car VARCHAR(15)) BEGIN DECLARE _a INTEGER; SET @s = CONCAT('SELECT COUNT(*) FROM train WHERE ', _car, '<=0;'); PREPARE stmt1 FROM @s; EXECUTE stmt1; …
lostsheep
  • 39
  • 1
  • 1
  • 6
3
votes
1 answer

Argument's type in MySQL procedures?

I am writing some MySQL procedures for a web-based application, and something that strikes me is that there is no argument's type check at all. For instance, if I have the following : CREATE PROCEDURE foo(n CHAR(4)) I can call it with whatever I…
3
votes
2 answers

How do I retrieve values from a nested Oracle procedure?

I have kind of a tricky Oracle problem. I am trying to select one set of data, we'll call items. For each item I want to call another procedure and return an Inventory Item. I have two operations I am not sure on how to perform. How do I retrieve…
user526892
3
votes
2 answers

Procedure which modifies incoming array of double by Normalizing (without using Linq)

I've already written down the code for a procedure that modifies an incoming array of doubles by normalizing it. To normalize the array of numbers, I had to divide each number by the maximum value in the array. However, my code forces me to…
Zerox
  • 61
  • 5
3
votes
20 answers

What single characteristic is most important for a good routine?

Routines, procedures, methods - whatever you call them, they are important building blocks for us developers. What single characteristic would you rate as the most important one? (By providing one characteristic per answer, it is possible to vote…
Ola Eldøy
  • 5,720
  • 7
  • 49
  • 82
3
votes
1 answer

MYSQL return a single row query with a format

I got this procedure : DELIMITER $$ CREATE PROCEDURE `countRows`(IN v varchar(30)) BEGIN SET @t1 =CONCAT("SELECT COUNT(*) FROM ",V); PREPARE stmt3 FROM @t1; EXECUTE stmt3; DEALLOCATE PREPARE stmt3; END$$ DELIMITER ; And I want this to…
Edw4rd
  • 147
  • 1
  • 9
3
votes
3 answers

How to execute a procedure which is inside a package?

There is a package ABC and many procedures inside it. I want to execute a single procedure inside that (say xyz). I used the below commands begin ABC.xyz; end; I am not able to run the same. Can any one help as I am getting Unexpected symbol…
Ramanathan K
  • 1,829
  • 3
  • 13
  • 8
3
votes
1 answer

Doctrine + SQL Server Stored Procedures

How can I call a stored procedure using Doctrine?
Rodrigo Reis
  • 1,097
  • 12
  • 21
3
votes
1 answer

Count recurring records on data base every 30 minutes interval

I need some help on the below i have the table "Data" getting data stored on it like the below +------------+----------+----------- | regdate | regtime | items +------------+----------+----------- | 2013-03-02 | 09:12:03 | item1 …
Ahmed ElGamil
  • 179
  • 1
  • 13
1
2
3
17 18