Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why the results are different?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01353035
Message ID:
01353043
Views:
17
You didn't provide enough information about relationship between curLoaded and curImported to answer your question. My guess is that there're multiple records in curLoaded with the same cClient_Account_Number and they match some reoord(s) with the same cClient_Account_Number in curImported. IOW, I suspect that more than one field is involved in relationship between curLoaded and curImported.

>
>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.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform