Zero Length Join

G

Guest

How do I create a query that uses multiple fields to do the linking between
tables when sometimes some of the values in one or two of the fields have
zero length values in them? I cannot set a rule that will not allow zero
length because we are using a table from someone elses database and the data
already exists in the tables.

Right now I have done some testing and if I eliminate the link between the
zero length fields the data shows up with the link in there, no data!

Thanks for you help.
 
S

Sylvain Lafontaine

If Zero length value the same thing as Null or as "" for you?

Try something like:

.... From A join B on ((A.id = B.id or A.id is Null or A.id = "") and (A.Id2
= B.Id2) and ....)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top