Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why there is a difference - accounts missing...
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01079769
Message ID:
01079785
Views:
13
>Hi everybody,
>
>Why these two would return different results?
>
>SELECT COUNT(cTrans_pk) FROM Trans ;
>INNER JOIN trans_Employees_Queues ON Trans.ctrans_pk = Trans_Employees_Queues.ctrans_fk AND ;
> Trans_Employees_Queues.iactive_flag = 1 ;
>WHERE Trans.cResolution_Codes_Fk is NUll
>
>SELECT COUNT(cTrans_pk) FROM Queue_Names ;
>INNER JOIN trans_Employees_Queues ON Queue_Names.cQueue_Names_pk=Trans_Employees_Queues.cQueue_Names_fk ;
> INNER JOIN Trans ON Trans.ctrans_pk = Trans_Employees_Queues.ctrans_fk ;
> AND Trans_Employees_Queues.iactive_flag = 1 ;
>WHERE Trans.cResolution_Codes_Fk is NUll
>
Ok, I found that SELECT * FROM Trans_Employees_Queues WHERE cQueue_Names_fk NOT in (SELECT cQueue_Names_pk FROM Queue_Names) returns 826 records. So our last data load has a problem, which explains the difference in my statistical results.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform