Daniel Kasak schreef:
Jan Bassez wrote:
The reason I use tekst field is because sometime I need to use for
instance: 4A or 4B
I would split the numeric and strings parts. ie have a numeric
field, and then an extra field to store your 'modifier' or whatever.
Then sort by numeric_field, string_field
That's an option but I see that more as a workaround.
?
I also have my classical records in a Base catalog. Many Classical
pieces have Opus number, so I have a field for that. It contains this
content:
op. 14
op. 45
op. 125
and it has the same sorting problem.
That's right.
One could say leave the 'op.'
That's right :)
but pieces of Bach have BWV instead of op., also you have WoO
(Without opus) and KV & P for other composers.
Splitting them up is an idea I dont like too much....
Well ... this is a problem. What you see as a 'workaround' is in fact
the correct way of doing things. What you have is 2 separate logical
pieces of data. Keep them separate. You are also causing troubles for
yourself. Storing numbers as strings is inefficient ( takes up more
room ), slower ( string comparisons are a lot slower than numberic
comparisons ), and as you've discovered, causes sorting problems.
If it alarms you that the data is split up into 2 fields, you can
always append the 2 fields together in your select string.
Isn't it possible for some kind of combinable field String/numeric
field.
Yes. You can jump through hoops if you want to. You can use a huge,
complex, slow query to break the data in your single field into 2
separate fields, convert the numeric portion back to a number, and
then sort on the fields separately. But this is a brain dead
workaround for a database design problem. Seriously - the data should
be split into 2 columns.
or a sorting option wich looks for numeric values in a string field,
and threats them as such?
..in future versions?
I'm not an OpenOffice developer, but I can tell you now that this is
not going to happen.
So, the only way is splitting the fields in the database...
hmm...
I've got almost 1500 records already....
First time I use a database program in fact.
additional question:
what should I do with fields who contain this: PV 522 (op.268)
there aren't a lot of these, but there are some...
These also exist...
I thinks as a solution I create a second field wich contains only the
number to sort on, and leave this field as is for informational purpose.
(I did this too with the catalog numbers wich are sometimes preceded by
thins as SMLP ####)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]