Hi
I have data in one table sth like this...
test id name qty amt
3 xyz 1 12
3 xyz 2 24
GP
0
4 abc 4 1
2 xb 2 34
2 xb 2 1
GPNT extra blah
0
5 abc 2 10
NT testtest
0
2 xyz 1 3
2 abc 3 12
NT note without group
0
GP stands group, NT stands for note for only upper item...GPNT means note
for whole group..
I need to output sth like this...(grouping is by id)
id name qty amt
------------------------------------------------
3 xyz 3 36
------------------------------------------------
4 abc 4 1
2 xb 4 35
note: extra blah
------------------------------------------------
5 abcd 2 10
note: testtest
2 xyz 1 3
2 abc 3 12
note: note without group
is this possible to get this output? i m thinking its very complex..i hope
atleast you understand what I want...
pls help me..even its possible through some function or routine or some
code, tht also would be greatfull...
thanx in advance
dave
accesspro4u@aol.com - 16 Mar 2005 03:21 GMT
I am a bit confused about the note descriptions, i.e. GP, GPNT extra
blah, NT test test, etc. Your field names are: test id name qty amt
Are these note descriptions separate fields in the same table? I would
recommend breaking those into two extra fields, maybe NoteGroup and
NoteDescription. Example NoteGroup values would be GP, GPNT, NT. Then
NoteDescription values would be "extra blah", "test test", etc. Then
you could simply do a Group By, or Totals query. Include each field in
the Group By query, and make sure the Totals row reads "Sum" for the
'qty' and 'amt' fields. Then you can create a report based on this
query, and group the report by a calculated field of (= NoteGroup & " "
& NoteDescription)
Good Luck
Mark
access---pro4u@aol.com(no dashes)
http://access-pro.tripod.com
dave - 16 Mar 2005 04:11 GMT
u need to read msg in html format so u will have better idea...
thnx
dave
> I am a bit confused about the note descriptions, i.e. GP, GPNT extra
> blah, NT test test, etc. Your field names are: test id name qty amt
[quoted text clipped - 12 lines]
> access---pro4u@aol.com(no dashes)
> http://access-pro.tripod.com
accesspro4u@aol.com - 16 Mar 2005 03:21 GMT
I am a bit confused about the note descriptions, i.e. GP, GPNT extra
blah, NT test test, etc. Your field names are: test id name qty amt
Are these note descriptions separate fields in the same table? I would
recommend breaking those into two extra fields, maybe NoteGroup and
NoteDescription. Example NoteGroup values would be GP, GPNT, NT. Then
NoteDescription values would be "extra blah", "test test", etc. Then
you could simply do a Group By, or Totals query. Include each field in
the Group By query, and make sure the Totals row reads "Sum" for the
'qty' and 'amt' fields. Then you can create a report based on this
query, and group the report by a calculated field of (= NoteGroup & " "
& NoteDescription)
Good Luck
Mark
access---pro4u@aol.com(no dashes)
http://access-pro.tripod.com