Re: nested if , and how to trigger....

From: "Muhammad Rusydi" <rusydi(at)cbn(dot)net(dot)id>
To: "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: "postgres general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: nested if , and how to trigger....
Date: 2001-05-06 20:00:01
Message-ID: 006901c0d667$7a1d73e0$1102a8c0@windows
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

> > create table tb (
> > code varchar(4),
> > classes varchar(6),
> > lecture varchar(4),
> > th int2,
> > day varchar(1),
> > hr varchar(1),
> > room varchar(4),
> > primary key (code,kl,ds));
>
> code,kl,ds? What are kl and
> ds?
sorry, it should be code,classes,and lecture

>
> > my questions is how to prevent this record to be insert:
> > code classes lecture th day hr room
> > K021 1tip01 1011 5 1 1 1111
> > K022 1tip01 1011 5 1 1 1111
> >
> > or :
> > code classes lecture th day hr room
> > K021 1tip01 1011 5 1 1 1111
> > K021 1tip01 1012 5 1 1 1111
>

code is for the subject that lecture teach on the class
what i really want to do is how to prevent:
1. different subject will not be give at same time (day and hr), same room
2. different lectures with same subject will not be at same time and room
too
3. but one lecture can teach same subject in different classes at same time
and room
TIA
Didi

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tulio Oliveira 2001-05-06 22:48:02 Re: I lost the pg_control file
Previous Message GH 2001-05-06 17:48:38 Re: how to close idle connection created with php's pg_pconnect()