Application Development 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: 

Fixed values in select

Former Member
0 Kudos

Hi,

when i worked with DB2 sometimes i used select like this:

select "A" t1-c1 t1-c2...

from t1

where c1 = ..

union

select "B" t2-c1 t2-c2...

from t2

where c1 = ..

in this way i can "classified" records with same structure coming from different table (like BSAD BSID)

Nobody nows how can do this "directly" in sql , not working with internal tables?

If this post is not clear please contact me to suppsap@piaggio.com

Many thanks

2 REPLIES 2

Former Member
0 Kudos

So long as you are working with DB2 (don't know about other databases), you should be able to do this using native SQL.

Rob

0 Kudos

I will try.

I not nows how ABAP transform native SQL in standard SQL but declare cursor, open and fetch are not friendly as well as ABAP sql.

My hints was reduce the bytes transfer from DB server and /or semplify the classification of extracts data and at same time reduce the occupacy of memory and run time cost.

Thank.