Re: HOW? Sequencing primary key appended with a character.

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/11/27
Message-ID: <57ha0h$rq2_at_newton.pacific.net.sg>#1/1


Hilary Juma <jh110_at_gre.ac.uk> wrote:
>Please how can one sequence the primary key each time to create a tuple.
>
>Examples
> supplier# value is S1001
> the next should automatically be s1002 on creation.
>
>
>Thanks in Advance.
>
>
>Hilary Juma.

Hi there,

You can have a database trigger (insert) which will retrieve the running number from an sequence and concatenate with 's' and insert into that table.

Regards

N.Prabhakar Received on Wed Nov 27 1996 - 00:00:00 CET

Original text of this message