Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read data from secondary database

Former Member
0 Likes
718

Hi guys,

i want to read data from a secundary database.

Syntax:

Select * from <table> connection ( ‘DB2’ ) …

When I start the report, I get a runtime exception:

“Table unknown or does not exist.”  (DBIF_RSQL_TABLE_UNKNOWN)

The table do exist on secundary database. How can I specify a database scheme?

Jörg

2 REPLIES 2
Read only

Former Member
0 Likes
552

Hi Joerg,

regarding the schema: when you configure the secondary connection via the DBACOCKPIT you specify a user name. This defines in particular the schema in the secondary DB when using Open SQL (via native SQL (e.g. using ADBC) you can also specify the schema but then of course the user requires access to the respective schema).

Regarding your scenario note that in order to use Open SQL via secondary connection it is required that the table/view exists in the dictionary of your local system. But I guess this is the case because otherwise you would have gotten a syntax error (unless you used dynamic SQL and specified the table name as a string). 

Cheers,

Eric

Read only

former_member184871
Contributor
0 Likes
552

Hi Jörg Lutzke

It seems you forgot to mention the INTO TABLE - clause.

Request you to try this :

SELECT * FROM <TABLE> CONNECTION ('HDB1')

     INTO TABLE lt_xyz                               "(Name of the Internal Table)      

WHERE parameter = 'Some value'.

Regards

Kumar.