coulmn [message #212080] |
Wed, 03 January 2007 13:25 |
durai
Messages: 38 Registered: December 2006
|
Member |
|
|
i created one table with column
gender char(2);
when is selected the table it shows the column gender as
ge
--
m
f
m
m
..
what shall i do to make it as gender
|
|
|
|
|
Re: coulmn [message #212157 is a reply to message #212151] |
Thu, 04 January 2007 00:57 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Littlefoot wrote on Thu, 04 January 2007 07:51 | How many genders are there in your country (so that you need 2 characters, but use only F and M)?
|
And, to add to the bad design, make it CHAR(2) instead of VARCHAR2, so you will get the pain of trailing spaces for free!
|
|
|
|
|
|
|
Re: coulmn [message #212249 is a reply to message #212240] |
Thu, 04 January 2007 06:02 |
|
Littlefoot
Messages: 21807 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Please, Brian, do so. As it is urgnt.
Maarten, I don't know what was this project about, but being an "infant male" isn't really normalized. As that infant grows, its gender changes - first to child, then ... whatever follows. So, what was business rule: schedule a job which would - on daily basis - decide who isn't a child any more or who is about to die any moment or ... and update that column?
I'd, somehow, rather see their gender set to M and F (or preferred letters in someone's native tongue), while "infant" or "child" would be a matter of SYSDATE - Date_of_birth calculation.
As you can see, I have some spare time at the moment .
|
|
|
|
Re: coulmn [message #212294 is a reply to message #212269] |
Thu, 04 January 2007 09:55 |
durai
Messages: 38 Registered: December 2006
|
Member |
|
|
i got the answer of this question, thanx to all for ur kind reply, actually my doubt is regarding the display of the column gender
initially when is use
select * from empgender;
ge
--
m
m
f
f
but when i made changes
col gender format a6
it works properly
select * from empgender;
gender
------
m
m
f
f
once again thanx to every body
|
|
|