[Zope] Sorting Problem
McDonnell, Larry
lmcdonnell@protonenergy.com
Fri, 30 Aug 2002 08:11:39 -0400
Hi,
I am having a sorting problem. My DB is MSAcess. My ZSQL Method is as
follows:
select * from document_change_request
where (part_num like <dtml-sqlvar part_num type="string">) and
(change_request_number like <dtml-sqlvar change_request_number
type="string">);
Arguments <<...OLE_Obj...>>
part_num:string="%"
change_request_number:string="%"
My dtml-in is <dtml-in type_part_num_search sort=revision_type reverse>
The sort will put all the records in reverse order except the last. This
record should be the first but remain the last.
Output:
Part Number: pes00016-2
Change Request Number: 01217 Revision: J
Change Request Number: 01189 Revision: H
Change Request Number: 01148 Revision: G
Change Request Number: 01111 Revision: F
Change Request Number: 01107 Revision: E
Change Request Number: 00080 Revision: D
Change Request Number: 00064 Revision: C
Change Request Number: 00048 Revision: B
Change Request Number: 02147 Revision: K
The records the the db are as follows:
part_num Change_Request_Number Revision_type
PES00016-2 00048 B
PES00016-2 00064 C
PES00016-2 00080 D
PES00016-2 01107 E
PES00016-2 01111 F
PES00016-2 01148 G
PES00016-2 01189 H
PES00016-2 01217 J
PES00016-2 02147 K
Any suggestios, Thanks.
Larry McDonnell
Proton Energy Systems
50 Inwood Rd.
Rocky Hill, CT 06067
(860) 571-6533 ext. 531
Email:lmcdonnell@protonenergy.com
www.protonenergy.com