Need Urgent Help with SQL Syntax & Oracle
Date: 4 Sep 2001 03:43:47 -0700
Message-ID: <79ab94fa.0109040243.5a681b81_at_posting.google.com>
Hi,
*******LONG EXPLANATION, SKIP IT IF U LIKE AND JUMP RIGHT INTO THE
QUESTION AT THE BOTTOM
I have a realy big problem. We get a whole bunch of Data from an
external Provider coming along as somthing like
name/value/unit/descr... The guy that developed the system (wich i
have to maintain :( ) put a 2nd. table where comments to each set of
values is stored.
what i have to do now is pull some of these out in kind of flat way.
for some reason these tables dont have a unique id but have a uid and
timestamp so i take one set of UID's and timestamp's and take the
comments from one table plus the values/descr.... from the other and
put them together in a view.
This works so far. I get one record with the uid, timestamp and one
row for each value and descr.
now the problem is that for some reason i have for the same uid 1 record in the values table and 2 records in the comments table... but the timestamps are also the same. seems that the software that is filling the tables if buggy and inserts the old timestamp into a new record if its for the same user.
BUT, there is also another Date given for each record that is in a DD/MM/YYYY HH:MM:SS format. I have no Idea what its for, but these dates seem to be the actual time.
QUESTION:
Now my Question is, is there a way to do something like:
SELECT * FROM table1, table2 WHERE
table1.date isPlusMinusOneHourOf table2.date
Received on Tue Sep 04 2001 - 12:43:47 CEST