|
Posted by Helmut Woess on 06/03/06 10:41
Am 2 Jun 2006 16:08:28 -0700 schrieb Jchick:
> Im a newbie with a sql table in a MSDE database that contains fields of
> CustName, BrokerName, Type, Status.
>
> I am trying to write a trigger that does this:
>
> 1. When a new record in a table is added, I would like the selected
> fields to be copied to another table (call it Master).
> 2. If that Master table already contains a record where the CustName =
> CustName, then simply ignore. If CustName does not match anything, then
> add the record to the Master Table
>
> In other words, I am trying to create a table (or even a new database)
> that has unique records in it - making a master customer list.
>
> Any hints on how to get started on this?
It is very easy to do this with a trigger. Read the OnlineManual (see
CRAETE TRIGGER), there are a lot of examples too.
But i don't see the sense of something. Because if i need a unique list of
customers from first table i do a "select distinct custName from table" and
have my result - no need for a master table. But it's your application :-)
bye, Helmut
Navigation:
[Reply to this message]
|