View Full Version : performing a report


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

ajetrumpet
09-28-2007, 11:46 AM
Ariel...I see no connection between the two tables that you have provided here. Can you elborate on what exactly your desired result has to do with your first table. How are they related??

Arielr
09-28-2007, 12:07 PM
Excuse me, I 've fixed my error on the original post. The RESULT table is going afte r the query. I have an idea about that but I don't know how to trim the right '0' from the code field. Thank you

ajetrumpet
09-28-2007, 12:37 PM
I'm sorry Ariel, but again, you have only shown what you want the result to look like. There is no way of knowing how your result RELATES to the source recordset, or what task you are trying to accomplish. We are not mind readers...

You asked about trimming a '0'. Look up the Trim() function in the help menu, and the Left() and Right() functions for selecting outer portions of text strings.