Category "stored-procedures"

Stored Procedure Snowflake - time formatting issue

var get_end_time = "select CURRENT_TIME()"; var time_sql = {sqlText: get_end_time}; var time_create = snowflake.createStatement(time_sql); var time_exec_end = t

which is best using delete or truncate when i need to delete all data from table?

I work on sql server 2017 I need to delete all rows from table student_course but I don't know which is best for use delete from student_course OR truncate tab

Snowflake: Flag infinite loops in hierarchical data without using cursor in Snowflake

I'm struggling with a SQL code performance issue, while trying to identify in advance circular references of a dataset with approximately 1.5 MO rows candidates

How to create a function in PL/SQL and return output

I am try to create a function that will table input to function and return me output My code : create or replace function details(keyword varchar2 , depid varch

How to handle 2 OUT user-defined custom data types from Java Spring Data JPA @NamedStoredProcedureQuery defined on @Entity class?

UPDATE: I have tried implementing the SQLData interface for my Financial.class and PersonalInfo.class Java POJOs defined on my @NamedStoredProcedureQuery for th

Can not safely replay call when trying to assign and use a variable in procedure

I am trying use the data from a column in one table as column aliases of another table. DECLARE var1 VARCHAR(20), var2 VARCHAR(20); BEGIN WITH TABLE1

Attempting to INSERT values into a MySQL DB from C# code within a form, but getting "Column cannot be NULL

All - thanks in advance for your time. So, background info - I am trying to create a form for contact registration using C# to pass the information into my MyS

VBA stored procedure SQL Server

I'm trying to send data from excel spreadsheet to sql server. The code runs properly but the change of status is not done. Before those steps, I already added d

Creating procedure that add value when it doesn't exist (Syntax error)

I'm trying to create a procedure that add a value that doesn't exist but I'm currently getting a syntax error. I don't know how to correct the error. Any help w

Use array_filter in foreach

I am presenting this problem when making a store in my database, which is data entered from a table in my view. Example: table For example, my user selects row

Use array_filter in foreach

I am presenting this problem when making a store in my database, which is data entered from a table in my view. Example: table For example, my user selects row

How to call a stored procedure in Spring Boot?

A query for a stored procedure for multiple delete yield an error message shown way below. CREATE OR REPLACE PROCEDURE delete_dim_page(_page_id bigint) LANGUAG

How do I backup a database with a stored procedure in SQL?

I'm trying to create a stored procedure that backs up a database, however whenever I execute it, the folder I'm trying to backup to remains empty. Here is my st

How to force COMMIT inside function so other sessions can see updated row?

In a Postgres 12 database, I have multiple queries (SELECT, UPDATE, ...) in a function that all together take about 20 minutes to complete. I have a check at th

How to fill a datagridView with my stored procedure on load

I have this stored procedure that selects the top 10 results from its inner join CREATE PROCEDURE SP_SELECT_DOCS_WHERE_JOBID_STATUS @JobID INT, @BatchID

Oracle nvl2 not working in stored procedure PLS-00201: identifier 'NVL2' must be declared

As title, I'm writing some Stored Procedure on Oracle, first I checked the version SELECT * FROM v$version; with result Oracle Database 11g Enterprise Editi

invoking a stored procedure with input parameter and out cursor in perl script

Trying to execute a procedure in perl script, Proceure ->create or replace PROCEDURE Getproc ( v_catg IN CHAR DEFAULT NULL, v_cursor OUT SYS_REFCURS

SQL Stored Procedure Parameter set to Uppercase

I want to force a user's string input in a stored procedure to uppercase. I tried writing UPPER prior to the @parameterName but I got a syntax error. Is this

SQL Stored Procedure Parameter set to Uppercase

I want to force a user's string input in a stored procedure to uppercase. I tried writing UPPER prior to the @parameterName but I got a syntax error. Is this

Share code stored procedure in SQL Server

I have created a destination data table (exp: tbl_des_txn) with the same structure as the source data table (exp: tbl_source_txn). including columns: txn_id, tx