SELECT main.id
FROM MainTable main OUTER JOIN MapTable map ON main.id = map.id
WHERE map.id = null
Does this work? Give it a whirl.
Another solution could be to do it like this:
SELECT col1, col2, coln
FROM MainTable
WHERE id IN (
SELECT id
FROM MainTable
WHERE id NOT IN (
S
SELECT MAX(id)
FROM (SELECT MAX(id)
FROM table
WHERE DATE = '20020509'
LIMIT 100)
Dunno if this works in MySQL, I can't access a MySQL database from here to
test it out.
This should return the value that you want but I would be interested to
learn the usefulness of runni
I don't want to doubt you :-) but can you show us a select including the
time component? I don't know how date comparison works in MySQL but here is
a test I ran in Oracle. I inserted some dates into a table using sysdate
which include time information and inserted more records using
to_date('20
Perhaps the time component of the date is different, hence you are getting
back what looks like duplicate rows but they're not really?
- Max
Martin Anderson
QA Engineer
ProfitLogic
Eleven Cambridge Center
Cambridge, MA 02142
t: 617.218.1946
-Original Message-
From: Jay Blanchard [mailt