Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

sorting based on various data types
I've been tasked with designing a database to store collective
agreements.  I need to store each sub-article of each article of each
agreement in it's own row within a table.  I'm having difficulty
figuring out the best way to store each sub-article's identifier so
they sort properly.

The majority of the collective agreements use numbers in a dotted
notation, for example:

1.1
1.2
1.3.1
1.3.2
1.3.3
1.4

Some agreements mix letters with numbers, such as:

A-1.1
1.1.A.1

Any ideas how I should deal with this?


Report this thread to moderator Post Follow-up to this message
Old Post
Josh
06-21-05 12:24 PM


Re: sorting based on various data types
Use fixed length fields for each number in your "path string", ie:

0001.0001
0001.0002
0001.0003.0001
0001.0003.0002
0001.0003.0003
0001.0004
0A-1.0001
0001.0001.000A.0001

Converting the path is simply a case of removing leading "0" after each
fullstop.  This should sort correctly.


"Josh" <jpiche@caut.ca> wrote in message
news:1119356513.427410.173150@z14g2000cwz.googlegroups.com...
> I've been tasked with designing a database to store collective
> agreements.  I need to store each sub-article of each article of each
> agreement in it's own row within a table.  I'm having difficulty
> figuring out the best way to store each sub-article's identifier so
> they sort properly.
>
> The majority of the collective agreements use numbers in a dotted
> notation, for example:
>
> 1.1
> 1.2
> 1.3.1
> 1.3.2
> 1.3.3
> 1.4
>
> Some agreements mix letters with numbers, such as:
>
> A-1.1
> 1.1.A.1
>
> Any ideas how I should deal with this?
>



Report this thread to moderator Post Follow-up to this message
Old Post
Robin Tucker
06-21-05 02:23 PM


Re: sorting based on various data types
That's much simpler than the ideas I had.  Thanks!


Report this thread to moderator Post Follow-up to this message
Old Post
Josh
06-21-05 02:23 PM


Re: sorting based on various data types
You should be using a document management tools for documents.  And
this is coming from an SQL fanatic!


Report this thread to moderator Post Follow-up to this message
Old Post
--CELKO--
06-22-05 02:23 PM


Re: sorting based on various data types
We're planning to create a system that will compare articles from many
different agreements and will link articles and sub-articles to a
subject index.  Users will then be able to pull up contract language
from various agreements that deal with the specific subject they are
interested in.  We have a document management system here, but it
certainly can't do this.  Are you aware of other document management
tools I should look at?


Report this thread to moderator Post Follow-up to this message
Old Post
Josh
06-23-05 04:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:51 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006