![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Everyone, A sql Newbie here about to go nuts... Ive been reading a lot of postings on the CurrentMemeber, PrevMember functions but am unable to get them working. Heres my problem. In a table i have values based on an ID column, however there are some IDs that have multiple rows..example below. TABLE: ID MarketValue 01 10000 01 20000 02 25000 03 15000 02 40000 Want it to look like: ID MarketValue 01 30000 02 65000 03 15000 Now i was wondering how i can create a column either in this table, or in a named query, which gives the total marketValue of each ID. Ive been trying to use the PrevMember Function to compare if the CurrentMemberID=PrevMemberID then if it does add the market values... Any help is appriciated |
#3
| |||
| |||
|
|
Hi, You have to use a query or view: SELET ID, SUM (MarketValue) as MarketValue FROM YourTable GROUP BY ID That's it Greets Buelli daveoram24 (AT) hotmail (DOT) com schrieb: Hi Everyone, A sql Newbie here about to go nuts... Ive been reading a lot of postings on the CurrentMemeber, PrevMember functions but am unable to get them working. Heres my problem. In a table i have values based on an ID column, however there are some IDs that have multiple rows..example below. TABLE: ID MarketValue 01 10000 01 20000 02 25000 03 15000 02 40000 Want it to look like: ID MarketValue 01 30000 02 65000 03 15000 Now i was wondering how i can create a column either in this table, or in a named query, which gives the total marketValue of each ID. Ive been trying to use the PrevMember Function to compare if the CurrentMemberID=PrevMemberID then if it does add the market values... Any help is appriciated |
![]() |
| Thread Tools | |
| Display Modes | |
| |