General information
Category:
Coding, syntax & commands
Title:
Writing a SQL statement.
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only