By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,025 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Compare Query Problems

P: n/a
Hi,

I need an Query that will compare two fields. I need to take the first
line in field1, and search for that identical line in field2. If NOT
found in field2, display it. Then, goto the next line in field1, search
for identical appearances in field2. If NOT found in field2, display
it.

I think you get the point. And i'm not sure on the correct way to do
this, so I could use some help.

Thanks a million.

Ralph

Oct 27 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 27 Oct 2006 06:58:08 -0700, "Ralph" <ju*********@gmail.comwrote:

select field1 from SomeTable where field1 not in (select field2 from
SomeTable)

-Tom.

>Hi,

I need an Query that will compare two fields. I need to take the first
line in field1, and search for that identical line in field2. If NOT
found in field2, display it. Then, goto the next line in field1, search
for identical appearances in field2. If NOT found in field2, display
it.

I think you get the point. And i'm not sure on the correct way to do
this, so I could use some help.

Thanks a million.

Ralph
Oct 27 '06 #2

P: n/a
Tom,

It didn't work for some reason? The logic is right, i think.

Maybe if you could explain to me, what your understanding is on what I
want to accomplish.

Oct 27 '06 #3

P: n/a

Ralph wrote:
Hi,

I need an Query that will compare two fields. I need to take the first
line in field1, and search for that identical line in field2. If NOT
found in field2, display it. Then, goto the next line in field1, search
for identical appearances in field2. If NOT found in field2, display
it.

I think you get the point. And i'm not sure on the correct way to do
this, so I could use some help.
What do you mean by 'the first line' in field1 or field2? Are these
pieces of text delimited by linefeed/carriage returns? And when you
say 'display it', do you mean display field1 or display field2 or just
'the first line' from field1 or just 'the first line' from field2? I
think we'll need a little more detail on what you're trying to do.

Bruce

Oct 27 '06 #4

P: n/a

Ralph wrote:
Hi,

I need an Query that will compare two fields. I need to take the first
line in field1, and search for that identical line in field2. If NOT
found in field2, display it. Then, goto the next line in field1, search
for identical appearances in field2. If NOT found in field2, display
it.

I think you get the point. And i'm not sure on the correct way to do
this, so I could use some help.
What do you mean by 'the first line' in field1 or field2? Are these
pieces of text delimited by linefeed/carriage returns? And when you
say 'display it', do you mean display field1 or display field2 or just
'the first line' from field1 or just 'the first line' from field2? I
think we'll need a little more detail on what you're trying to do.

Bruce

Oct 27 '06 #5

P: n/a
On 27 Oct 2006 07:20:13 -0700, "Ralph" <ju*********@gmail.comwrote:

Sorry. It's YOUR job to explain to us what you want.
-Tom.

>Tom,

It didn't work for some reason? The logic is right, i think.

Maybe if you could explain to me, what your understanding is on what I
want to accomplish.
Oct 28 '06 #6

P: n/a
Ralph

Why don't you show us the SQL statement as you wrote it.

Tom is right in what he told you but it may not have gotten translated
correctly
when you typed it.

The other option is, as others have said, that "line" in your question does
not really mean "record" but involves some substring search.

I only found this newsgroup about a month ago but from what I have seen it
is universally true that if you ask a good, clear question - you get good,
clear, actionable answers.

Seems like a very good deal to me and the price is tough to beat!

Kevin C

"Ralph" <ju*********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Hi,

I need an Query that will compare two fields. I need to take the first
line in field1, and search for that identical line in field2. If NOT
found in field2, display it. Then, goto the next line in field1, search
for identical appearances in field2. If NOT found in field2, display
it.

I think you get the point. And i'm not sure on the correct way to do
this, so I could use some help.

Thanks a million.

Ralph

Oct 30 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.