Using Microsoft query through Excel

M

Martha Chau

I am using Microsoft query through Excel to pass data from
a Sybase database. I want to use the OR command in my SQL
code but when I do this, executing this code is extremely
slow. Here is a sample of my code (there is also a prompt
for the user to input data) :

select top.cpty_name, sub.cpty_name
from top.cpty_acct ca,
sub.cpty_acct sub
where (top.id_party = sub.id_party
OR top.nm_acc_cpty_grp = sub.nm_acc_cpty_grp)
and top.id_active='Y' and top.nm_acc_cpty=?
 
C

Chong Moua

Hi Martha,

I'm not sure how valid it is for you to use "OR" to link
tables together. I have never used "OR". I always
use "AND" if I want more than one link on two tables. I
believe "OR" is used more for field selection criterias.

Hope this helps...

Chong Moua
 
M

Martha Chau

Hi Chong


I am not using "OR" to link my 2 tables, I am using it in my field
selection criteria.

Martha


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

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