POV-Ray : Newsgroups : povray.off-topic : Dr POV-Ray : Re: Dr POV-Ray Server Time
6 Sep 2024 11:19:01 EDT (-0400)
  Re: Dr POV-Ray  
From: scott
Date: 20 Feb 2009 08:56:02
Message: <499eb672$1@news.povray.org>
> It is scaresly possible to make this any *more* simple. (I guess you'd 
> have to have something with no PK/FK relationships at all - e.g., "list 
> all customers born after 1980" or something.)
>
> Seriously, this is probably the most *basic* thing you can ask SQL to do. 
> Jesus... AND you've allowed to use the SQL Server CHM files.
>
> Apparently "I've had people come in here claiming to have 20 years' 
> experience with SQL who were unable to do that test as well as you just 
> did". WTF?? O_O

OK so as an SQL beginner let me ask if this is possible.

Say you have lots of experiments, and each experiment is made up of several 
events repeated some number of times (like over-temperature, switched-off, 
switched-on etc).

I'm thinking that I make a table for events first, like:

EventID, Description
0, Switched on
1, Switched off
2, Over-temperature warning
...

Then I make another table for experiments

ExperimentID, StartDateTime, DeviceNumberTested, Description
0,blahblah,53535,"Test 1"
1,blahblah,23112,"Test 2"
...

You get the idea.

Then I should make another table to hold all the events that occur in all 
the experiments.

ExperimentID,EventDateTime,EventID
0,blah,1
0,blah,0
0,blah,2
0,blah,1
1,blah,1
...

OK.  That all seems quite basic to me so far and seems the best way to 
organise things.

Now, is it possible to do a search using SQL that does something like this: 
Find all the times that an experiment has gone over temperature while 
switched on (ie after a switched on event but not after a switched off 
event)?  This is beyond my basic knowledge how I would do such a thing 
without writing some code to manually search the results and checking times.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.