Solved

Look in the list generated by a query

Posted on 2003-11-14
2
154 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

772 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