Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Code
Message
 
 
To
07/04/2000 10:04:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00356833
Message ID:
00356837
Views:
11
>I need help. My app is a timekeeping/scheduling app. I have a table that contains all the employee clock numbers of my department. I have another table that collects data as the employee starts inputing their hours. When the employee turns in their timesheet the administrator looks at a list of all the employee's and starts clicking the ones turned in. This in turn sets a flag in the second table indicating the timesheet is complete. I have the list box reseting it's rowsource as the items are clicked but for some reason my SQL statements are not coded correctly because it still pulls up all the numbers again. My SQL statements are:
>Select badgeno From second table Where complete = .T. Into Cursor
>Select badgeno From first table Where first.badgeno <> second.badgeno
>What am I doing wrong?

I believe the following is what you are really trying to do:

select badgeno from table2 where complete = .t. into cursor crsTable2 nofilter

select badgeno from table1 where badgeno not in (select badgeno from table2 where complete = .t.) into cursor crsTable1 nofilter

If the first select was just to get the exception list for the second list and is only an intermediate cursor, then you can delete the first select and just use the second command.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform