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

Storing number '001' ?

From: Charles Hauser <chauser(at)acpub(dot)duke(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: Storing number '001' ?
Date: 2001-12-05 23:33:26
Message-ID: a05010406b8345cd76f07@[152.3.11.193] (view raw or whole thread)
Thread:
Lists: pgsql-novice
Hi,

I need to store numbers which contain '0' as the first digit like '001', '01' .

A little history.  A DNA clone_id is denoted by '894001A01.x1'.  I 
need to sort  clone_id, and have broken it down into its meaningful 
components:

project:	894
plate:		001
plate row:	A
plate column: 	01
read:		x
ver:		1

CREATE TABLE clone_fasta (
project integer NOT NULL,
plate integer NOT NULL,
p_row char(1) NOT NULL,
p_column integer NOT NULL,
read char(1) NOT NULL,
ver integer NOT NULL,
length integer NOT NULL,
seq text NOT NULL,
PRIMARY KEY (project,plate,p_row,p_column,read,ver)
);

Unfortunately, storing these numbers as integers converts 001 ->1, 
which I can't use.

How does one store a number like '001'?

Thanks,
-- 
Chuck

Responses

pgsql-novice by date

Next:From: daniel holtzmanDate: 2001-12-06 07:00:49
Subject: multiple joins
Previous:From: Jason EarlDate: 2001-12-05 16:04:10
Subject: Re: what's going on...

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