From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | operationsengineer1(at)yahoo(dot)com |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Sorting Challenge |
Date: | 2005-08-31 18:04:29 |
Message-ID: | 20050831180429.GA14167@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Tue, Aug 30, 2005 at 22:51:34 -0700,
operationsengineer1(at)yahoo(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | operationsengineer1 | 2005-08-31 19:33:48 | SQL Time Issue |
Previous Message | Charley L. Tiggs | 2005-08-31 14:27:22 | Re: psql commandline |