Skip to Content
0

Pulling Data from multiple databases having common tables SAP HANA

Mar 23, 2017 at 09:47 AM

70

avatar image

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.

10 |10000 characters needed characters left 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.

0

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.

Regards,

Manish

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lucas Oliveira
Mar 24, 2017 at 12:19 AM
0

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.

BRs,

Lucas de Oliveira

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Lucas,

thanks for the response, do you have any sample for dynamic SQL script ?

Regards,

Manish

0

Sure, but what about looking into the documentation ? :)
Cheers,
Lucas de Oliveira

1