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

SELECT secondary database SELECT * error

Former Member
0 Likes
1,570

Hi,

I have an Open SQL statement to select a secondary database. When using SELECT *, an error states that SQL error 207 when accessing table. If I specify the column names, the select statement works well. I want to know the underlining logic.

SELECT *

     INTO CORRESPONDING FIELDS OF TABLE LT_MARA

     FROM MARA

          CLIENT SPECIFIED

          CONNECTION T01

    WHERE MANDT = '100'

    


Best regards,

ts.

10 REPLIES 10
Read only

Former Member
0 Likes
1,427

hi Ts

when you use CONNECTION to a secondary database, see the last statement.

... CONNECTION {con|(con_syntax)}

Note

This addition is for internal use only.
It cannot be used in application programs

Effect

The Open SQL command is not executed on the standard database but on the specified secondary database connection. The database connection can be specified statically with con or dynamically as the content of con_syntax, where the field con_syntax must belong to the type c or string. The database connection must be specified with a name that is in column CON_NAME in table DBCON.

regards,

Archer

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
1,427

Hello T S.

     Can you paste the error screen shot here?

Regards.

Read only

0 Likes
1,426

Read only

0 Likes
1,426

SQL Server: Refer to Note 1630727 to prevent SQL error 207: "Invalid column name 'area'"

Read only

0 Likes
1,426

Do you have some ANIMAL_ORIGIN column in select as mentioned in dump first screen shot.?

Read only

0 Likes
1,426

No, I just select data from MARA.

Read only

0 Likes
1,426

Hi TS

Did you check DBCON entries for this secondary database are maitnained. Secondly please make sure both table have same field in both databased. Please verify

Nabheet

Read only

0 Likes
1,426

Yes, connection has been confirmed by remote log-in. The no difference on structures.

Best regards,

ts

Read only

0 Likes
1,426

Can you please paste your code here...? DBCON entries are maintained? Please check SM21 after the dump to see if it provides you some more details. Please paste it here.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,426

It may come from the CORRESPONDING FIELDS.

If you execute the statement in a textile industry system and the native SQL statement in a non textile industry system. The list of corresponding field would come from calling database but the statement is executed on another database ?

Regards,

Raymond