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.


--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to