Skip to Content

Pulling Data from multiple databases having common tables SAP HANA

Hi All,

I have a scenario where i have common table across multiple Schema's, now i want to pull the data from all the schema's using one query or SP or View.

I can do it using the Union function but my challenge is what if i have some new schema's in future and i have to go back and add that schema in my code that's manual process each time.

is there any solution that each time i add a new schema's and my code,query/SP/view can include it automatically instead of going back and edit each time.

Add comment
10|10000 characters needed characters exceeded

  • Please provide some more detail about the use case.

    Why are there occasionally new schemas that come up, that also share similar tables?

    Also, what do the tables you like to combine actually contain?

    Since schemas are essentially namespaces for database objects (and only occasionally used to allow multiple _similar_ application instances in the same DB), there is no special feature to fulfil your requirement. So, whatever solution you go for, you would have to implement it yourself.

  • Hi Lars,

    Thanks for the response.

    every time when the customer have a new project they treat it as a separate entity and manage the accounting books separate.

    the tables contains the financial data like chart of accounts table and the table which store every financial transaction posted to the accounts from any document.

    let me know if you need more details.



  • Get RSS Feed

1 Answer

  • Mar 24, 2017 at 12:19 AM

    Hi Manish,

    I can't really see this working with graphical calculation views. As you said, you want to dynamically use different schemas (Im assuming you have the same table name spread on those schemas) on your solution.

    My first thought is to use dynamic SQL on a scripted calc view.


    Lucas de Oliveira

    Add comment
    10|10000 characters needed characters exceeded