?
Solved

Look in the list generated by a query

Posted on 2003-11-14
2
Medium Priority
?
162 Views
Last Modified: 2013-12-24
hello experts

here is my situation:

i have a query

<cfquery name="getzip" datasource="woodmenzip">
        select Zipcode from ZipCode
        where State = '#state#' and Division = '#div#'
</cfquery>

that will give me a bunch of  zipcodes, say 100 of them. Working fine.

now i have another query:

<cfquery name="getmem" datasource="gchart">
select Member_FName, Member_LName, Member_Add1, Member_City, Member_State, Member_Zip, Member_Phone
from GC_Members
where Member_AgeRange = '#form.Member_AgeRange#' and
Member_Status = '#form.Member_Status#' and Flag = 1 or flag = 0 and Member_Zip = #QuotedValueList(getzip.ZipCode)#
ORDER BY Member_FName

In the above query, i want to display all the members who have a zipcode in the recordset that i get from earlier query. Note that these two reside in different DBs and i cant join the table. so what i was thinking was to store the query result in a list. Pls help.. i dont know if I have done a good job explaining.
0
Comment
Question by:adonis1976
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
jyokum earned 2000 total points
ID: 9750933
you could join the two recordsets with a query of queries

<cfquery name="qryData" dbtype="query">
SELECT
    getmem.Member_FName,
    getmem.Member_LName,
    getmem.Member_Add1,
    getmem.Member_City,
    getmem.Member_State,
    getmem.Member_Zip,
    getmem.Member_Phone
FROM
    getmem, getzip
WHERE
    getmem.Member_Zip = getzip.Zipcode
</cfquery>
0
 
LVL 11

Author Comment

by:adonis1976
ID: 9751024
hey thanks a million..
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question