Update datarow

A

ApeX

hey, so i have a datatable like this:

col1 col2 col3 col4
-----------------------------
M X 1 2
N Y 1 5
O X 2 7
N Z 2 4
M Y 2 3
O Z 1 8

and i need to get summed rows for each col3 value, like this:

col1 va1(col3 for val 1) val2(col3 for val 2)
---------------------------------------
M 2 3
N 4 5
O 7 8

recap:
col1 can have multpile col2 values, and only 2 col4 values depending
of col3 values.

the problem is that i cannot use the primary key property because if
i take
col1 and col2 there won't be unique columns, and if i take three
columns as primary key
i wont' find any rows to update.
any help would be appreciated...
Thanx!
 
A

Aaron

Based on the original data and the result set that you show, it doesn't
seem that you want a column to sum.
Rather it appears that you want to select the values from col4 where col1
values are the same and then reorganize them
into a different structure. Is that correct?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top