General information
Category:
Coding, syntax & commands
Title:
Problem with sql select using multiple tables
Hello:
I'm trying to pull information into a report based on conditions
from 3 tables using select statements. I'm storing this in a cursor that then will produce my report. My problem is that I want the results of the first select statement, that uses two tables, put in a cursor and then get the these results to match and ultimately print the information from my main table. Can I append from one cursor to another to do this or is there an easier way. My code is as follows:
select cs.sin from coun_sum, act_plan ap where cs.sin = ap.sin;
and !empty(ap.follow_dte) order by cs.sin into cursor test
I want these cs.sins to match my client.sins from my client table and print the client information into a report.
So I need another select statement based on the result of the first select statement. i.e. , if I get 10 sin numbers from my select statement I want the matched sin in the client table to print to my report.
Any help would be greatly appreciated.
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