Re: Sorting Challenge - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: Sorting Challenge
Date
Msg-id 20050831180429.GA14167@wolff.to
Whole thread Raw
In response to Re: Sorting Challenge  (<operationsengineer1@yahoo.com>)
List pgsql-novice
On Tue, Aug 30, 2005 at 22:51:34 -0700,
  operationsengineer1@yahoo.com wrote:
>
> the code is actually a single field.  the reason it
> isn't just a numeric value is b/c i thought there
> would be value in making the code somewhat human
> readable.
>
> as it stands now, a person can look at the defect code
> and know will know the causal process.
>
> is there a better way to make the code semi-human
> readable and still act as a defect code (and primary
> key)?

Yes, split it into two columns and use the combination of columns as a
primary key. When displaying the information to humans, concatenate the
two fields. You could even create a view which has a column with the
concatenated fields.

pgsql-novice by date:

Previous
From: "Charley L. Tiggs"
Date:
Subject: Re: psql commandline
Next
From:
Date:
Subject: SQL Time Issue