You need to perform a SQL "join" on your two tables. For example:
Code:
select a.ctrl_no, organization_name, domain_name
from organizationinfo a, temp_organizationinfo b
where a.ctrl_no = b.ctrl_no
and a.ctrl_no = '1420';
This does the following:
[list=1][*]Gives the aliases 'a' and 'b' to tabkes 'organizationinfo' and 'temp_organizationinfo'[*]Relates ("joins") table 'organizationinfo' to 'temp_organizationinfo" via the field 'ctrl_no'[*]Further restricts the query to only those records where 'ctrl_no' in 'organization_name' equals 1420[*]Prints out the fields ctrl_no, organization_name and domain_name for each record that matches your search criteria[/list=1]
I qualified "a.ctrl_no", to distinguish it from "ctrl_no" in the other table (temp_organizationinfo). If some of the other columns match, you'll have to qualify those column names, too.
If the same data is in both tables, I'm not sure why you'd even need a join: just do a simple "select" from one table or the other (but not both at the same time).
Finally, if you're planning on doing much database work, I'd *highly* recommend the following book:
"SQL Queries for Mere Mortals", Michael J. Hernandez and John L. Viescas
Hope that helps .. PSM