1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] How to pass schema name as parameter in stored procedure

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 7, 2024 às 16:42.

  1. Stack

    Stack Membro Participativo

    I need to pass a schema name as a parameter to a stored procedure. But I end up with error:


    ORA00942: table or view does not exist.

    I Googled a lot but didn't find any solution.

    Actually in our application we are writing a Stored procedure (SP) in One schema and referring the same SP for all other schemas.

    Consider, I have to find the stock of an item in a different schema (1 schema for 1 client). Then

    select * from abc.stock_table where itemid=xxx;


    In this query I want to replace abc with different schema names.

    Continue reading...

Compartilhe esta Página