Solved

Look in the list generated by a query

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apached AXIS end to end simple good example 2 103
IIS 8.5 2 52
Nameserver and MX Record 2 81
IIS Authentication Error 401 16 15
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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