Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Zeroes for no entries
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00437224
Message ID:
00437616
Views:
18
>I can post the data if you like. Shall I just put it in a message?
>
>I am thinking I can never have the banks show up with zero because there would be nothing there to count. When an entry has no numbers, it is not even in my data. The only way I could get zeroes in this case is to use a AGTABLE of some sort with all the banks. I would then join my results with that table to create the zero entries.

Randall,

If you have a lookups table with all banks and their descriptions, you can do your select first. Then find records, which are not in your select, but in Lookups Banks table and insert from this cursor.
IOW:
1) Your select statement into table TableResult
2) select bankname from Banks where bankname not in (select distinct bankname from TableResult) into cursor curNotInResult
3) select TableResult
append from dbf('curNotInResult')
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