Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
44 views

I have an interesting issue with passing parameters to a udf from within a stored procedure. I can pass one parameter and send a valid string value for the second parameter, and it works fine. See ...
MountainBiker's user avatar
1 vote
0 answers
42 views

I have this stored procedure: CREATE PROCEDURE [dbo].TestInsert @doubleVal float AS BEGIN INSERT INTO Test (Dubs) VALUES (@doubleVal); END which inserts a SQL float into this table: CREATE ...
Markus's user avatar
  • 1,299
0 votes
0 answers
42 views

I am trying to run a query in T-SQL to identify stored procedures that are defined with optional ("defaulted") parameters. I had expected this to be a common thing for people to try and find ...
DinahMoeHumm's user avatar
0 votes
2 answers
96 views

I am calling a SQL Server stored procedure from C#. It works fine as long as the result is not longer than 2033 characters. If it is longer than 2033 characters, the result is truncated at 2033 ...
Mark Ainsworth's user avatar
1 vote
1 answer
60 views

I have a question about this package: create or replace PACKAGE BODY emp_pkg IS FUNCTION valid_deptid(p_deptid IN departments.department_id%TYPE) RETURN BOOLEAN IS v_dummy PLS_INTEGER; ...
sara montenegro abad's user avatar
Advice
0 votes
3 replies
70 views

I'm working in Teradata SQL Assistant and I need to create a stored procedure that, given a table name, returns the percentage of NULL values for each column in that table. Right now, I generate the ...
danny's user avatar
  • 67
-3 votes
0 answers
62 views

I have a stored procedure and know its input parameters. How can I extract this data from this stored procedure in PHP? I have a query that allows me to display this data in the MSSQL database itself. ...
Мария Багманова's user avatar
1 vote
1 answer
60 views

I have the following procedure written in redshift, which uses 2 for loops to get country code first and then years as per the country codes. --Procedure : sp_for_loop_test create or replace procedure ...
MAK's user avatar
  • 7,345
0 votes
0 answers
64 views

I am trying to use for loop within the stored procedure to retrieve the employee id and process further but getting an error: Error: SQL Error: Internal jdbc driver error Procedure: create or replace ...
MAK's user avatar
  • 7,345
0 votes
0 answers
60 views

We have a stored procedure in DB2 written in an external sproc (possibly some mainframe language, possibly C++) that creates an XML structure and puts it on a queue. I know we can add a correlation id,...
Bill Rosmus's user avatar
  • 3,021
0 votes
1 answer
199 views

First, to define what I'm talking about, the "length" of a source is how many characters it has. Having more characters allows improving readability by using more descriptive function and ...
Vladimirs Kacs's user avatar
0 votes
2 answers
82 views

I need to rewrite the code for getting and filtering the list of products. The older version used directly the SQL table Products, and filtered the result by code or name of a product, category, etc, ...
pepr's user avatar
  • 21.1k
2 votes
1 answer
80 views

I have a database on a Ubuntu system, that belongs to the postgresql user kalle (the owner of the database and the tables). That user is also the owner of the trigger function getimage, written in the ...
Kai Behncke's user avatar
1 vote
0 answers
97 views

I have the following simple Postgres stored procedure created that just sleeps a number of minutes as passed in to call: create procedure sleep_test(delay_minutes numeric) language plpgsql as $$ ...
Rumtis's user avatar
  • 23
0 votes
1 answer
55 views

I did some reading and then confirmed with our DBA's that our databases are not federated. So, I figured I could write a stored procedure to connect to the first database and store the query output ...
Dave Clark's user avatar
1 vote
1 answer
95 views

Suppose I have two stored procedures, foo and bar, both written using Snowflake Scripting language. Inside foo, I want to call bar asynchronously and get a return value from bar. Is there currently a ...
Kal's user avatar
  • 1,729
0 votes
1 answer
134 views

I am trying to get data from Postgres table with a help of stored procedure and fill a Winforms DataGrid with it. This is the stored procedure: CREATE OR REPLACE PROCEDURE public.get_list() LANGUAGE ...
Yarr's user avatar
  • 47
2 votes
1 answer
268 views

I am trying to learn how to call stored procedure from springboot data jpa repository and returns a cursor from stored procedure. While I am implementing I am getting error like org.springframework....
Mr.DevEng's user avatar
  • 1,688
-2 votes
4 answers
402 views

I am trying to learn and implement PostgreSQL Stored procedure call from Spring Boot repository using @Procedure annotated method. While calling stored procedure I am getting error saying that: Error ...
Mr.DevEng's user avatar
  • 1,688
3 votes
1 answer
82 views

Why I am asking this After upgrade of Oracle JDBC driver in a Spring Boot application from 23.5.0.24.07 to 23.7.0.25.01, all stored procedure invocations in Spring Boot (via StoredProcedure beans) ...
usr-local-ΕΨΗΕΛΩΝ's user avatar
0 votes
0 answers
52 views

From the JDBI docs I got the following information: Here’s how to call a stored procedure: try (Call call = handle.createCall("{:sum = call add(:a, :b)}")) { OutParameters result = call....
Thomas_SO's user avatar
  • 2,641
0 votes
1 answer
77 views

Alright, I've beat my head against the wall enough. So, I'm giving you my entire stored procedure. This procedure scans all tables in a selected schema to identify character columns that have "...
Dave Clark's user avatar
2 votes
1 answer
56 views

I confirmed the following syntax in the DB2 LUW v11.5 manual (we are running DB2 LUW v11.5.9). And apparently this syntax has been supported at least since v9.7! This is in a stored procedure and, ...
Dave Clark's user avatar
0 votes
1 answer
93 views

I am developing an ADF pipeline that looks through a set of ADLS directories and extracting the name and last modified dates for each folder. I have written the extracted information to a "Set ...
Ifeanyi's user avatar
  • 87
1 vote
2 answers
73 views

New to stored procedure development. I'm developing a stored procedure where I create and populate a table with the results of a query, where I get an identifier number (DCNumber), FirstName, LastName,...
TARKUS's user avatar
  • 2,252
2 votes
0 answers
118 views

I have this code into an IBM DB2 stored procedure, when I send the @action = 'I', then the INSERT statement is executed successfully, but when I send @action = 'D', the DELETE statement remains in ...
triby's user avatar
  • 39
0 votes
2 answers
93 views

I've compiled other stored procedures (from SQuirrel© v4.8) and was able to figure out the error messages sufficiently to find my errors until I get a successful compile. But this time I'm getting ...
Dave Clark's user avatar
1 vote
1 answer
61 views

I work with a BI software that generates dashboards for clients. We build charts for the clients by creating stored procedures under our own schema for rendering. Each stored procedure is a SQL query ...
Michael Aranda's user avatar
1 vote
1 answer
82 views

For my studies I have created a simple no frills skills matrix which calls a T-SQL stored procedure to record the values in a table. When hitting the 'Submit' button, the stored procedure executes. ...
Graham Howard's user avatar
0 votes
1 answer
34 views

CREATE OR REPLACE PROCEDURE CleanupShiftLogs AS SHIFTNOTE_COUNT_1 CONSTANT NUMBER, SHIFTNOTE_COUNT_2 CONSTANT NUMBER, SHIFTNOTE_COUNT_3 CONSTANT NUMBER; BEGIN DECLARE ...
Ed Carrick's user avatar
-1 votes
1 answer
58 views

The following stored procedure has three calculated fields, votes, percentVotes and grandTotalVotes. The procedure works fine and produces the correct values when tested. However, of the three ...
Kenny's user avatar
  • 1,048
0 votes
2 answers
123 views

I have a stored procedure that extracts historical information — a lot of historical information — but sometimes end users, perhaps by mistake or due to bad practices, send queries larger than they ...
Hugo Guadalupe Sánchez Ruiz's user avatar
0 votes
0 answers
35 views

I am trying to make table creation, data insertion, index creation tasks in the postgres db via AWS lambda trigger. so for this activity, created a stored procedure for table creation and triggering ...
user30774163's user avatar
2 votes
0 answers
51 views

I have two DBs that are created on two different servers. The first DB is CBRRS_QA, and the other is CBRRSAPN. The CBRRSAPN is created buy adding all in CBRRS_QA so basically tables, views, and SP are ...
Vinuka Osura's user avatar
2 votes
1 answer
42 views

I've seen plenty of examples of static SQL in sample Linux DB2 stored procedures. But if I code static SQL in my Linux DB2 stored procedure, as follows: SET v_MsgText = 'DROP LOC CHECK failed.'; ...
Dave Clark's user avatar
1 vote
1 answer
85 views

I created my first Linux DB2 stored procedure through SQuirrel© (to a remote database) and the procedure is working. However, this was difficult and time-consuming because I couldn't see what progress ...
Dave Clark's user avatar
2 votes
0 answers
95 views

Declaring of cursors where data is through JSON format, I keep getting: Column is not valid at this position, expecting for, lock, select, table, values, with … -- Procedure to insert Project ...
Dronal Bhardwaj's user avatar
0 votes
1 answer
34 views

Environment OceanBase community edition 4.2.1 (MySQL Mode) Tables partitioned by range (archive_2023Q1, archive_2023Q2, etc.) The user has full DML privileges on all archive tables I'm implementing ...
user avatar
0 votes
1 answer
44 views

Environment OceanBase community edition 4.2.1 (MySQL Mode) Table transactions has 1M+ rows, partitioned by id. I'm encountering performance issues with a stored procedure in OceanBase. The procedure ...
user avatar
0 votes
1 answer
54 views

I have a stored procedure that runs daily to archive data from a large table. It moves data in batches of 10,000 rows from table_name to table_archive_table, and deletes the moved rows from table_name....
Billy Hsu's user avatar
-3 votes
1 answer
95 views

Currently I have hundreds of stored procedures that are in multiple servers, and that coexist with other stored procedures that are in other servers with linked server. The origin of this is that when ...
Angel Zapata Marquez's user avatar
1 vote
1 answer
91 views

I need this working query as a stored procedure where I can give two databases (one masterdb one testdb), start chainage, end chainage and UniqueRun as input DECLARE @StartChainage FLOAT = 17.00; ...
anonymous123's user avatar
1 vote
1 answer
119 views

I have been trying to figure out a smooth way to use parameters in a Snowflake SQL stored procedure using this syntax: CREATE OR REPLACE PROCEDURE Schema1.TestProc (Param1 FLOAT) RETURNS VARCHAR ...
EliSquared's user avatar
  • 1,581
1 vote
0 answers
45 views

I am writing an oracle stored procedure to synch data between our databases. We have dev, test, stage, and performance databases. I plan to use DB Links. The problem I'm trying to solve is I want to ...
George's user avatar
  • 1,323
0 votes
2 answers
126 views

I have the following stored procedure: CREATE PROCEDURE [dbo].[SearchPaymentsByComp] @CompId INT, @OrderByCol NVARCHAR(255), @OrderByDir NVARCHAR(255), @SearchDate DATE = NULL, @...
TheIronCheek's user avatar
  • 1,241
3 votes
2 answers
95 views

I have a system where I need to identify different types of risk associated with entities. I have many large scripts for detecting different risk behaviours associated with entities, with some scripts ...
Alex Howard's user avatar
0 votes
0 answers
38 views

Environment OceanBase 4.2.1 (Enterprise Edition - Oracle Mode) I'm migrating Oracle stored procedures to OceanBase (Oracle compatibility mode) and encountering difficulties in debugging multi-step ...
user avatar
0 votes
0 answers
94 views

I have a specific stored procedure that executes in a SQL Server in about 0.250 seconds, when executed from SQL Server Management Studio, although it takes half a minute to display the resulting ...
Peter's user avatar
  • 1
0 votes
0 answers
24 views

Environment OceanBase CE 4.2.1 (MySQL mode) Table: 15M rows, indexed on (score, last_updated) When migrating a MySQL pagination stored procedure to OceanBase, LIMIT-OFFSET performs poorly with deep ...
user avatar
0 votes
0 answers
41 views

Environment OceanBase Community V4.2.1 (MySQL mode) MySQL Connector/J 8.0.28 Java 11 When calling an OceanBase 4.2.1 (MySQL mode) stored procedure that returns multiple result sets through JDBC, I ...
user avatar

1
2 3 4 5
744