Arielr
09-28-2007, 11:36 AM
I have this table with this information...
TABLE1
code.............Name............Amount.....type
'1000000'........'Name1'........... 0.00.....'N'
'1010000'........'Name2'........... 0.00.....'N'
'1010100'........'Name3'........... 10.00......'S'
'1010200'........'Name4'........... 5.00......'S'
'1010300'........'Name5'........... 0.00......'N'
'1010301'........'Name6'........... 1.00......'S'
'2000000'........'Name7'........... 0.00......'N'
'2010000'........'Name8'........... 0.00......'N'
'2010100'........'Name9'.......... 6.00......'S'
'2020000'........'Name10'......... 0.00......'N'
'2020100'........'Name11'.......... 3.00......'S'
A need to create consult whose result show like this:
RESULT
'1000000'.....16.00
'1010000'.....15.00
'1010300'..... 1.00
'2000000'......9.00
'2020000'......3.00
Could somebody help me this problem?. Thanks
TABLE1
code.............Name............Amount.....type
'1000000'........'Name1'........... 0.00.....'N'
'1010000'........'Name2'........... 0.00.....'N'
'1010100'........'Name3'........... 10.00......'S'
'1010200'........'Name4'........... 5.00......'S'
'1010300'........'Name5'........... 0.00......'N'
'1010301'........'Name6'........... 1.00......'S'
'2000000'........'Name7'........... 0.00......'N'
'2010000'........'Name8'........... 0.00......'N'
'2010100'........'Name9'.......... 6.00......'S'
'2020000'........'Name10'......... 0.00......'N'
'2020100'........'Name11'.......... 3.00......'S'
A need to create consult whose result show like this:
RESULT
'1000000'.....16.00
'1010000'.....15.00
'1010300'..... 1.00
'2000000'......9.00
'2020000'......3.00
Could somebody help me this problem?. Thanks