[Zope] Database table problem

Renier Leenders rf.leenders@planet.nl
Wed, 2 Oct 2002 11:10:06 +0200


Hello,

I think this question is OT but nevertheless. I don't know where to put m=
y=20
question elsewhere.=20
I use Zope as some kind of 'frontend' for an relational database. I want =
to=20
use the database to store laws. The idea is to retrieve articles with "SE=
LECT=20
FROM law WHERE  article_number >=3D x and article_number <=3D y".
Unfortunately not all law articles are numbered with 1, 2, 3, etc. If the=
y=20
were I could define article_number as integer. But some articles are numb=
ered=20
with 1, 2, 2a ... 13ab etc. When I define the article_number as char and =
I=20
retrieve I get a result with an sorting order like this: 1,10,11,11a,11b,=
12,=20
13ab ... 2a, 20, 21,21a. I could not find a database who supports "natura=
l=20
sort".=20
Has someone an idea to work around this problem with Zope? Any suggestion=
s=20
would be appreciated.