General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Include del recs in 1st tbl but exclude del recs in join tbl
I have 2 table, joins on id number. How do I get a result set that includes deleted records in the primary table, but exclude deleted records in the join table?
set deleted off
select last,tbl1.id,descr from tbl1 ;
left join tbl2 on tbl1.id=tbl2.id
The above will give me:
lastname1, id1, descr1
lastname1, id1, descr2
where in tbl2, I have these records:
id1,descr1 (deleted record)
id2,descr2
What I need is:
lastname1, id1, descr1
How can I accomplish that?
THANKS ALL!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only