Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why the results are different?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Why the results are different?
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01353035
Message ID:
01353035
Views:
57
Hi,

I have these queries:
SELECT * FROM stage_trans ;
WHERE tDate_Received between DTOT(DATE(2008,9,29)) AND ;
DTOT(DATE(2008,9,30))-1 AND cClient_Code = '1301' ;
AND cProduct_Line_Code ='201' INTO CURSOR curLoaded readwrite
INDEX on cClient_Account_Number TAG cAccount

* Returns 8973 records

SELECT * FROM trans ;
WHERE tDate_Received > DTOT(DATE(2008,9,29)) ;
AND cProduct_Line_Code ='201' AND cClient_Code = '1301' INTO CURSOR curImported readwrite
INDEX on cClient_Account_Number TAG cAccount

* Returns 3248 records

SELECT cL.* FROM curLoaded cL LEFT JOIN curImported cI ;
ON cL.cClient_Account_Number = cI.cClient_Account_Number ;
WHERE cI.cTrans_pk IS NULL INTO CURSOR curDifference
* Returns 2477 records

1. Why I didn't get all the difference?

2. Is there a way to get all accounts that were not imported?

Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform