Solved

Look in the list generated by a query

Posted on 2003-11-14
2
150 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
2 Comments
 
LVL 12

Accepted Solution

by:
jyokum earned 500 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now