Solved

MySQL  - All from one table, not if in other

Posted on 2013-01-09
2
193 Views
Last Modified: 2013-01-09
I have a table called Master, with a field in it called Unique.

I have a separate table, called tblLock, also with a field called Unique (both varchar)

I want a view of all the records in Master, UNLESS the unique fields match.  So the tblLock table excludes records from Master.

Thanks
0
Comment
Question by:Rush_2112
2 Comments
 
LVL 41

Accepted Solution

by:
ralmada earned 500 total points
ID: 38760247
you can try

select a.id, a.col1, a.col2
from Master a
left join tblLock b on a.id = b.id
where b.id is null
0
 
LVL 1

Author Comment

by:Rush_2112
ID: 38760363
I found that this works:

AND (Manager_Filter.`Unique` NOT IN (Select `Unique` from tblLock))
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL - Restore Database SQL File 5 52
Whether to use true/false, yes/no or 0/1 11 57
Determining creation & modification dates on MySQL tables 4 38
category table 2 24
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question