Function receives data table

0

I tell you, I have a function

CREATE OR REPLACE FUNCTION test_funcion(x numeric) 
RETURNS TABLE(codigo character varying) AS 'consulta'

LANGUAGE
    sql;

Which when entering an id (X) brings me a list of codes of purchases of that client .. it works perfect, what I wanted to know is if there was any possibility for that list of codes that I can return them put as input to another function, for example

funcion1 (x numeric)

funcion2 (todos los codigos que me trajo la funcion1)

Thank you!

    
asked by JuanManuel245 19.07.2018 в 22:57
source

1 answer

0

I am giving you a partial answer since you have not provided enough information to fully clarify the question.

You can create the second function that has as an only parameter an array and in the first function what you would do is pass it to it in that way.

I can not specify the code for its realization because you have not mentioned how you receive the customer's purchase codes (through a cycle or with variables).

    
answered by 25.07.2018 / 05:22
source