Questions tagged [procedures]

262 questions
2
votes
1 answer

MySQL procedure with SELECT returns entire table

I try to write a stored procedure that finds the user in table and returns him. But the procedure always returns entire table. DELIMITER // DROP PROCEDURE IF EXISTS `login` CREATE PROCEDURE `login`(IN login VARCHAR(20), IN password…
Anton
  • 129
  • 2
  • 9
2
votes
2 answers

Is there any use for views,triggers and stored procedures for a Java GUI project?

I am making a Java gui and web application which will use the same mysql database. It's a DTh management system where all the information will be stored and retrieved dynamically depending on input. I believe that views are static by nature and thus…
chettyharish
  • 1,704
  • 7
  • 27
  • 41
2
votes
2 answers

.SQL files in visual studio 2012

I have an question about executin of sql commands from visual studio, I have a few procedures which are not so short so it would be a drag if i execute them with comandtype text and write it with stringbuilder. I decided to write them in .sql file…
2
votes
1 answer

Using SELECT INTO in HSQL 2.2 routines

When I migrate a Oracle Function to HSQLDB I need translate the "Select into" for HSQLDB. The Oracle script may look like: CREATE FUNCTION getId() RETURN NUMBER IS temp_id NUMBER; ... BEGIN .... SELECT id id INTO temp_id from ( select…
villim
  • 23
  • 6
2
votes
1 answer

SQL Function execution using Spring JDBC

I have an sql function in the database FUNCTION RATELIMIT_OWN.Get_Logs ( p_yyyymm VARCHAR2, p_numec NUMBER ) the function returns TYPE RATELIMIT_OWN.LOG_RECORD AS OBJECT (EVENTID VARCHAR2(15), MSG …
RaceBase
  • 18,428
  • 47
  • 141
  • 202
1
vote
1 answer

Stored procedure calling, a weird situation i'm facing

Using Visual Studio 2008, C# For the past 2 days I'm facing a problem so I thought I would ask here. I have this stored procedure in my database called StoredProcedure1: ALTER PROCEDURE dbo.StoredProcedure1 @ID int, @Username varchar(10), …
1
vote
2 answers

oracle 10g overloaded procedures in a package

I'm trying to replicate the code found in: http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:59412348055 I did a copy and paste job. The package audit_pkg and the body compiled fine. But when I added the triggers the debug says "too…
user867647
  • 13
  • 2
1
vote
2 answers

How can you get the value of an ENUM within a MySQL Procedure

It seems to me that enums are broken within MySQL, at least on version 5.0.51a-24+lenny5 (Debian). I have a simple lookup table which contains an enum field: CREATE TABLE `FrameworkServices` ( ... `DNSType` enum('IP','CNAME') NOT NULL, …
iisystems
  • 1,089
  • 1
  • 11
  • 12
1
vote
1 answer

oracle: select information about a function/procedure

I would like to retrieve information about procedures/functions from Oracle database. I know, that I can use ALL_PROCEDURES and USER_OBJECTS tables, but they only inform me about names of existing procedures/functions. I would like to get return…
gruszczy
  • 40,948
  • 31
  • 128
  • 181
1
vote
1 answer

Can MySQL triggers or stored procedures be written in Java?

I have two databases. Changes like edits, insertions to one, need to be made to the second one as well and vice versa. Actually, one database is an old legacy database (with a very bad Entity-Relationship structure) and a legacy app front-end…
sysasa
  • 913
  • 1
  • 9
  • 16
1
vote
2 answers

An error occurred when passing a string argument to a sql-procedure (postgreSQL) using python psycopg

I’m trying to create a SQL-procedure spAppeUpdatetTimes() using SQL which accepts a string argument of the UPC item on the input. But it does not work correctly. At the output, it occurs that the procedure takes as an input not a solid string but…
Joe
  • 21
  • 5
1
vote
1 answer

How do I execute many Procedures inside one?

I have looked it up already but couldn't find the right solution for my question. I have many Procedures which copy tables from one database Schema called 'source' into another Schema on the same database called 'target'. The Procedures themself…
AnSuS
  • 45
  • 8
1
vote
1 answer

oracle procedure ORA-00942

I'm trying to execute a Merge procedure Iv'e created but I encounter the following error: Could not get schema Object:java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist I read in forum about the error and I made sure I'm on…
Roei Givati
  • 39
  • 1
  • 5
1
vote
0 answers

How to grant privileges to user inside a stored procedure in MySQL?

I want to create several stored procedures in my MySQL database and use them to grant privileges to users ( kind of implementation of roles). For example, I want to have admin1(), admin2(), user_type1(), user_type2() procedures, pass there user…
Skotti Bendler
  • 753
  • 1
  • 6
  • 17
1
vote
1 answer

Procedures in Lisp

What would happen if I were to define the following procedure in Lisp: (define (p) (p)) What value would it return? I'm not new to programming but I'm reading this book that's kinda more in depth and uses Lisp for the examples and this one has got…
I.Ilieva
  • 11
  • 1