468,316 Members | 2,106 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Data not eisting in tables

1
I amm having one of those DBA brain locks. I have two tables lets say table_1 and Table_2. The Join column in both (indexed) is col_1 ( variable character 75 ).

what I need to do is produce a record of those records in Table_1 that are not in
Table_2

over simplified example Data

Table_1 Col_1 Table_2 Col_1

abcd abcd
wxyz egka
wxyz wxyz

the Query needs to return "egka"
Jan 20 '09 #1
2 1613
sagark
12
You can use query something like this -

"Select Col_2 from Table_2 where Col_2 not in (Select Col_1 from Table_1)"
Jan 21 '09 #2
ck9663
2,878 Expert 2GB
Be careful with NOT IN. Read this and this.

Happy Coding!

-- CK
Jan 22 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Alexandre | last post: by
32 posts views Thread by Neil Ginsberg | last post: by
1 post views Thread by Andrew Arace | last post: by
9 posts views Thread by Brad | last post: by
9 posts views Thread by Anil Gupte | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.