10-07-2008 2:36 PM
Is it possible to create a select distinct statement for a structure where only one field should be distinct.
example:
data: ta_vbrk type standard table of vbrk.
select vbeln vkorg vtweg (distinct kunag)
into corresponding fields of ta_vbrk
where auart = 'xxxx'
and vtweg = 'yy'
My goal is to fill out the four fields ta_vbrk record but only for the kunag once.
I hope that's clear. It's hard to state when you don't know how to do it
10-07-2008 2:42 PM
If you have
A B E
F G E
X Y E
M N F
How should the result look like having only column3 as a distinct value?
? ? E
? ? F
10-07-2008 2:42 PM
If you have
A B E
F G E
X Y E
M N F
How should the result look like having only column3 as a distinct value?
? ? E
? ? F
10-07-2008 2:55 PM
Hi Rainer,
Thanks for replying.
In your example, I would want
A B E
M N F
10-07-2008 2:56 PM
Hi Rainer,
Thanks for replying.
In your example, I would want
A B E
M N F
10-07-2008 3:00 PM
Select all rows and then do a delete duplicates on column3 afterwards. There is no such functionality in SQL. Do not forget to sort the internal table before deleting the duplictaes.
10-07-2008 3:10 PM
Yup. That's what I did. I was just hoping to minimize the traffic across the network. But, I guess it's not possible.