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

unqueried fields have effect on results

P: n/a
Hi,

Is it possible for fields in a table to have an effect on the results of a
query which does not directly use those fields?

To explain, I use this query

Select * from addresses where address4 in (select country from countries)

This shows all results where address4 is also in the country table, but only
if address5 is not empty!

I don't use address5 in the sql so why is it having an effect? The values
having an effect for address five are ' ' (space) and '.' (dot), which
really I should get rid of anyway...

Any ideas?

Thanks,
Chris
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
What is the resultset for
select A.* from Addresses A
Inner Join Countries C
on A.Address4 = C.Country

"C L Humphreys" <cl*********@toofgib.moc> wrote in message
news:bl**********@ucsnew1.ncl.ac.uk...
Hi,

Is it possible for fields in a table to have an effect on the results of a
query which does not directly use those fields?

To explain, I use this query

Select * from addresses where address4 in (select country from countries)

This shows all results where address4 is also in the country table, but only if address5 is not empty!

I don't use address5 in the sql so why is it having an effect? The values
having an effect for address five are ' ' (space) and '.' (dot), which
really I should get rid of anyway...

Any ideas?

Thanks,
Chris

Nov 12 '05 #2

P: n/a
"HSalim" <On******************@msn.com> wrote in message
news:d1******************@nwrddc02.gnilink.net...
What is the resultset for
select A.* from Addresses A
Inner Join Countries C
on A.Address4 = C.Country


Tried that, exactly the same (as you'd expect I guess...)

Cheers,
Chris
Nov 12 '05 #3

P: n/a
> This shows all results where address4 is also in the country table, but only
if address5 is not empty!


Do you have stored relations on address5 in your DB?

Peter

--
No mails please.
Nov 12 '05 #4

P: n/a
"Peter Doering" <ne**@doering.org> wrote in message
news:bl************@ID-204768.news.uni-berlin.de...
This shows all results where address4 is also in the country table, but only if address5 is not empty!


Do you have stored relations on address5 in your DB?


I have no idea what you're on about :o)

To answer your question - probably not...

Thanks,
Chris
Nov 12 '05 #5

P: n/a
>> Do you have stored relations on address5 in your DB?
I have no idea what you're on about :o)
To answer your question - probably not...


;-)

From the DB-window:

Tools - Relationships, then Relationships - Show all. If the window is
empty you don't have any, then it's not your problem.

Peter

--
No mails please.
Nov 12 '05 #6

P: n/a

"Peter Doering" <ne**@doering.org> wrote in message
news:bl************@ID-204768.news.uni-berlin.de...
Do you have stored relations on address5 in your DB?

I have no idea what you're on about :o)
To answer your question - probably not...


;-)

From the DB-window:

Tools - Relationships, then Relationships - Show all. If the window is
empty you don't have any, then it's not your problem.


Ahh, there are some, but nothing to do with the addresses table or the
country table

Cheers,
Chris

Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.