If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > subquery with NOT IN

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-10-04, 13:46
dcphilli dcphilli is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
subquery with NOT IN

I'm using Pervasive 2000i SQL with Platinum for Windows. When I try to run the following query, it gets hung up like it is stuck in a loop.

Can anyone tell me what I have done wrong?

SELECT custkey, custname, shipaddr1, invdate, agedate, invno, doctot, reference
FROM "ARHDRH"
where location = 'RAL' and (arhdrh.invno not in (SELECT arhdrh. invno FROM "ARHDRH", "ARTRANH"
where arhdrh.invno = artranh.applytodocno)
Reply With Quote
  #2 (permalink)  
Old 03-10-04, 14:22
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
How long have you let it run? How many records are in the tables? What's probably happening is a temporary sort file is being created.
How long does the subquery (SELECT arhdrh. invno FROM "ARHDRH", "ARTRANH" where arhdrh.invno = artranh.applytodocno) take?
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 03-10-04, 14:25
dcphilli dcphilli is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
The subquery itself just takes a few minutes, I left the entire query running while I went to lunch, over an hour and it still hadn't returned anything when I got back. When I go into Windows task manager it says "not responding".
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On