Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL Question

SQL Question

From: Natter <natter_at_ecst.csuchico.edu>
Date: 1997/04/22
Message-ID: <Pine.HPP.3.95.970422093846.9694A-100000@steroid.ecst.csuchico.edu>#1/1

Does anybody know the answer to this or can you tell me where I can post this message? Thanks

Here is the create code:

create table bob(

	comp#          number(5),
	c_name         varchar2(25),
	c_address      varchar2(50),
	c_city	       varchar2(15),
	c_zip	       number(5),
	constraint comp#_pk primary key (comp#));

I want to add a secondary key that automatically uses the first 4 letters of the c_name and all 5 numbers of the c_zip fields. They need to be concatenated together.

ex. c_name = HEWLETT PACKARD c_zip = 95688

      The secondary key called key would be HEWL95688
      This would be done automatically by the code.

Is it possible??? I think it is I just don't know how to do it.

tn
natter_at_ecst.csuchico.edu Received on Tue Apr 22 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US