Questions tagged [procedures]

262 questions
0
votes
1 answer

SQL Update Column on new Datarow

I've a MySQL server and I'm running a WebShop on it. Is it possible to calculate the sum of all articles on an order. Now when I add a new row I have to call a method in my PHP Script to calculate the sum. Is this possible to automate in MySQL (ex.…
Kevin Horvat
  • 25
  • 1
  • 1
  • 8
0
votes
2 answers

Syntax error in declaration of PL/pgSQL function

Can anyone help me with this procedure? It's a pretty simple one, just want to insert some data into a table, but pgAdmin is giving me some errors. This is the procedure code: CREATE OR REPLACE FUNCTION FILL_INVOICE2(IN_NUM integer) RETURNS void…
Maki
  • 471
  • 2
  • 8
  • 17
0
votes
1 answer

How to write a procedure using variable?

I have two schema in my Oracle database. The first schema is "STUDENT" schema, that has 4 tables: course (id, name, date, master) grade (id, course_id, course_name, grade) master (id, stu_id, grade) detail (id, stu_id, master_id,date) Also I…
0
votes
0 answers

How to get previous row data by using SQL?

here is the table example main_CD code 1 aa 1 bb 1 cc 2 1231 2 1232 . that table have lots of data. but i will only use which main_CD is "1" (other data for other pages I cannot delete it) my question…
darly
  • 1
  • 3
0
votes
2 answers

TASM duplicate byte on buffer

I can't find flaw in my algorithm. Basically I want that get_byte would deal with a thing when whole buffer is analysed, new buffer would be loaded. Like, for example, if I have set my buffer length to 3 and I call get_byte 5 times, I get output…
Tomas
  • 31
  • 1
  • 8
0
votes
1 answer

Why does MySQL procedure stops executing upon running into an error? How to I allow it to continue?

I have a stored procedure that does many queries. And what I am trying to do is log any error "if any occurred" into a new table I have created then move on to the next query. Here is a portion of the procedure DELIMITER $$ CREATE…
Jaylen
  • 39,043
  • 40
  • 128
  • 221
0
votes
1 answer

pl/sql query which takes deptno from emp as input and return ename, sal all the columns from dept table

Can anyone please help me in solving this. I need to write a pl/sql query which takes deptno from emp as input and returns ename, sal plus all the columns from dept table.(I don't want to declare the columns individually, instead I want to use…
Rahul
  • 17
  • 3
0
votes
1 answer

Oracle - Create a procedure to insert into a dimension table from multi tables

I am designing a data warehouse for a small e-commerce, and I need to populate a dimension table for products from two tables product, and product_price_history. For simplicity let's say the columns for each table are as follow: product (prod_id,…
seemvision
  • 242
  • 1
  • 2
  • 12
0
votes
1 answer

How to troubleshoot MySQL procedure - Why loop is reaching max runs?

I have MySQL stored procedure that will create temporary table from remote server using FEDERATED tables. Then the procedure used these temporary table to do some work. I am seeing some issue where I get an error like Unable to connect to foreign…
Jaylen
  • 39,043
  • 40
  • 128
  • 221
0
votes
1 answer

How to define a procedure to call a function in python 3

I have written a function that takes two strings as arguments and returns true or false on whether they have the exact same letters in them. This is my code for it: def anagram(str1,str2): str1 = sorted(str1) str2 = sorted(str2) if str1…
alfiej12
  • 371
  • 3
  • 4
  • 15
0
votes
1 answer

How to inject parameter with EF6 / Code First?

I'm trying to figure out how to inject a parameter into Entity Framework 6 when using MapToStoredProcedures. Is this even possible? I just want to pass my currently logged in username from the application to the stored procedure, but I can't seem…
John
  • 921
  • 1
  • 9
  • 24
0
votes
1 answer

Include table gather stats in procedure

Friends, I'm using below procedure to move tables, indexes for each table and now trying to include dbms_stats.gather_table_stats in the procedure. Somehow whatever I do gathering stats not working. Could somebody please suggest what I'm doing…
homer
  • 423
  • 2
  • 11
  • 24
0
votes
2 answers

How to reset Gotcha statement in Python

I am trying to use a Gotcha statement to hold a list of variables for comparison. But at the end of my procedure I want to reset this list so that it is blank and the process can be restarted. Here is a simple example of what I want, and what I am…
Concarney
  • 21
  • 1
  • 1
  • 4
0
votes
0 answers

MySQL Procedure Execution - Issue with OutMessage

So I am running into an issue when executing this procedure. It runs properly by deleting the materials and creating a new item "HBlade", but at the very end, it isn't setting the argOutMessage to "Completed successfully. HBlade has been forged."…
AAGM
  • 1
  • 1
0
votes
0 answers

Test Microsoft Remote Procedure Call with C#

I see many people using ping to see if a server is up or not. In my test ping is ok but RPC is not allowed so it fails showing "The RPC server is unavailable". How can I also test RPC before executing my entire code? (executed if ping is ok - see…
user3912327
  • 1
  • 1
  • 7