Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Get Desired Result from SPT
Message
 
 
To
18/12/2008 10:56:58
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01368541
Message ID:
01368604
Views:
9
>I am haveing trouble with this SPT. It excludes any records that have a value in the recseq field that does not match my recseq criteria.
>
>
>testconnString = "Select recseq, descptncd," +;
>	" CASE WHEN status Is NULL THEN 0 Else status END As status," +;
>	" CASE WHEN cmnt Is NULL THEN '' Else cmnt END As cmnt, clcode From webprddt6.drawmextc1" +;
>	" Left Join webprddt6.drawmextc3 On webprddt6.drawmextc3.codeid = webprddt6.drawmextc1.clcode" +;
>	" Where (recseq = 52632 Or recseq is NULL) Order By clcode"
>
>
>
>First the webprddt6.drawmextc3 table contains no records with a recseq = 52632. However it does contain 4 records with recseq = 69607.
>
>Secnd my desired result is this should return 70 records which is the count of webprddt6.drawmextc1. It however only returs 66 records, excluding the 4 records already existing in the table. How do change the Where filter to include records that might have a different recseq?

Which records do you want to get? It looks to me that you want to get all records regardless on RecSeq number, so you don't need WHERE condition at all.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform