Re: How to prevent updates on foreign key default values

From: Steve Kass <skass_at_drew.edu>
Date: Sun, 7 Oct 2001 16:58:21 -0400
Message-ID: <9pqfpq$61g$1_at_nntp9.atl.mindspring.net>


But 'NOT REGISTERED' is not a school, so it doesn't belong in the schools table. If you want 'NOT REGISTERED' in your reports, you can get that from the NULL:

SELECT studentname, ISNULL(schoolname,'NOT REGISTERED') FROM student LEFT OUTER JOIN school
ON student.schoolid = school.schoolid

What is it that you need to be able to extract from the data that you don't think you can do by using a NULL schoolid to mean 'NOT REGISTERED'?

Steve Kass
Drew University

"Christoffer Vig" <chrde_at_online.no> wrote in message news:uitdrxop9.fsf_at_online.no...
> On Sun, 7 Oct 2001, ivanarj_at_aloeco.com_ wrote:
> > Christoffer,
> >
> > You could allow NULLs in student.schoolid. NULL could mean that you
> > don't know the school yet for this student.
>
> Yes but my whole idea was that I do not want NULL. I want 'NOT
> REGISTERED'. NULL means nothing.
> Christoffer
Received on Sun Oct 07 2001 - 22:58:21 CEST

Original text of this message