Hi,
I'm trying to run a select statement, but the where clause seems to be causing problems. If I seperate this into two different statements instead of using the "OR" statement, it runs ok, but I'd much rather do this with one single select statement. When I run it as is, it runs forever and eventually times out. Here's the statement:
--------------BEGIN STATEMENT-----------------
select customer.custid, customer.ownfname, customer.ownlname, customer.ownorgname
from customer, hostacct, domainorder, customerorder
where
(customer.custid = hostacct.custid and hostacct.domain LIKE 'ldsx.net')
or
(customer.custid = customerorder.custid and domainorder.ordid = customerorder.ordid and domainorder.domain LIKE 'ldsx.net')
ORDER BY customer.ownlname
---------------END STATEMENT----------------
Thanks for the help.
I'm trying to run a select statement, but the where clause seems to be causing problems. If I seperate this into two different statements instead of using the "OR" statement, it runs ok, but I'd much rather do this with one single select statement. When I run it as is, it runs forever and eventually times out. Here's the statement:
--------------BEGIN STATEMENT-----------------
select customer.custid, customer.ownfname, customer.ownlname, customer.ownorgname
from customer, hostacct, domainorder, customerorder
where
(customer.custid = hostacct.custid and hostacct.domain LIKE 'ldsx.net')
or
(customer.custid = customerorder.custid and domainorder.ordid = customerorder.ordid and domainorder.domain LIKE 'ldsx.net')
ORDER BY customer.ownlname
---------------END STATEMENT----------------
Thanks for the help.