Skip site navigation (1) Skip section navigation (2)

Re: Sorting Challenge

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 (view raw or flat)
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.

In response to

pgsql-novice by date

Next:From: operationsengineer1Date: 2005-08-31 19:33:48
Subject: SQL Time Issue
Previous:From: Charley L. TiggsDate: 2005-08-31 14:27:22
Subject: Re: psql commandline

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group