Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing a SQL statement.
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Writing a SQL statement.
Miscellaneous
Thread ID:
00146364
Message ID:
00146364
Views:
57
I am not sure how to write a SQL statement were I have 3 tables, and I want to do a count on 1 field in each table and store it in a cursor. I use a variable as a filter. I know how to write the code for 1 table, but am having troubles writing it for 3 tables. The 3 tables are not linked together in any way.

SELECT COUNT(table1.field1) as t1;
FROM dbtables!table1 WHERE table1.field1=somevarible into cursor; finalresults

The variable condition is the same for all 3 tables. If someone can help me, I would appreciate it.

TIA,
Jim
Next
Reply
Map
View

Click here to load this message in the networking platform