strongloop / strong-oracle

Deprecated: Node.js Driver for Oracle databases (Use https://github.com/oracle/node-oracledb instead)
Other
45 stars 18 forks source link

Create a variable with table as out parameter #45

Open jgauna opened 9 years ago

jgauna commented 9 years ago

From documentation we have these types:

OCCIINT
OCCISTRING
OCCIDOUBLE
OCCIFLOAT
OCCICURSOR
OCCICLOB
OCCIDATE
OCCITIMESTAMP
OCCINUMBER
OCCIBLOB

But what if we need to use a custom type (which in my case is a table out parameter? is there any way to do this with this connector?

Update:

This is the kind of query I need to run:

declare
p_preguntas webappportalpm.preguntas_table;
begin
schema_ok.pk_portal_n.preguntas_registro(p_credencial => '0005985', p_preguntas => p_preguntas);

for i in 1 .. p_preguntas.count
loop
dbms_output.put_line('PREGUNTA: ' || p_preguntas(i).pregunta);
for j in 1 .. p_preguntas(i).respuestas.count
loop
dbms_output.put_line('RESPUESTA: ' || p_preguntas(i).respuestas(j).respuesta);
dbms_output.put_line('CORRECTA: ' ||p_preguntas(i).respuestas(j).correcta);
end loop;
dbms_output.put_line('----------------------');
end loop;
end;

Where what I need is a way to pass p_preguntas as a JS variable.

Thanks