37,167 questions
-3
votes
1
answer
46
views
How to solve column reference "description" is ambiguous error [duplicate]
This query is called get_all_with_columns(). I am trying to create a procdure which returns 2 columns in PostgreSQL, but I am facing an error.
Here is the procedure with the query:
CREATE OR REPLACE ...
2
votes
3
answers
170
views
SQL Server stored procedure passed a Biztalk XML message not returning field values when parsing the XML text
Our integration team want to send a XML parameter from their Biztalk server containing values to be written to a SQL Server table using a stored procedure, and have sent me an example for me to create ...
1
vote
1
answer
88
views
Passing Parameters to a User Defined Function from within a Snowflake Stored Procedure
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 ...
2
votes
0
answers
84
views
LinqToSql float stored procedure param generates string that is too long for double value of 0.820035
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 ...
0
votes
0
answers
48
views
Find SQL Server stored procedures that have optional parameters [duplicate]
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 ...
0
votes
2
answers
115
views
Stored procedure result truncates at 2033 characters [duplicate]
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 ...
1
vote
1
answer
72
views
Call to an overloaded procedure inside another procedure in an Oracle/PLSQL package
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;
...
Advice
0
votes
5
replies
74
views
Procedure to show percentage of nulls in TERADATA SQL ASSISTANT
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 ...
1
vote
1
answer
68
views
Redshift : Opening multiple cursors from within the same client connection is not allowed
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 ...
0
votes
0
answers
67
views
Redshift - SQL Error: Internal jdbc driver error
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 ...
0
votes
0
answers
66
views
How do I / example of adding source info in IBM MQ Header (possible MQRFH2/usr) from DB2 stored procedure
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,...
0
votes
1
answer
200
views
Does source length of SQL functions matter
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 ...
0
votes
2
answers
83
views
ASP.NET Core Web API + EF: how to convert the list of entities to queryable?
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, ...
2
votes
1
answer
84
views
User context and permissions when writing files from inside a plsh function in PostgreSQL on Ubuntu
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 ...
1
vote
0
answers
102
views
Postgres stored procedure doesn't return if running longer than 5 minutes
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
$$
...