Hi.
You folks have been most helpful in the last few days and I think I will
be needing some more help as this project progresses. But I think I've
finally gotten all the rust off my CF skills...haven't used CF in
almost 2 years
lots has changed.
Anyway...to my problem:
Below you will find 2 queries. The first is a standard CF query that looks
at a table called "nxsdfct", it pulls all columns and data in those columns...
pretty standard query. the second query...the problem child (!!!) giving me
no end of problems...is one where the query actually works (yea for me),
it looks at both the NXSDFCT and NXSPRODR table and cross compares
against the matching product codes...yielding the product descriptor.
Thusly.
table a
id issue prod_code
2 not wrk ST-1234-A
5 Wrk Dead STA-1134-C
9 Stp Solaris STU-1356-A
table b
prod_code prod_desc
ST-1234-A SiteLister for NT
STU-1356-B SiteLister for Unix
STA-1134-C SiteLister Agent - Java
invoking the problem query below (2nd query) it should and does
yield a join that lists all the prod_desc from table b.
however a problem arises when you actually put that query into
action as I did in the <cfoutput> statement below. You'll see the query
line denoted with "(problem child) -->" marker.
Instead of ending up with the proper product listings as the query implies...
what I end up with is for each record that query 1 sees, it mis idendifies
the product descriptor with the FIRST product descriptor for each and
every record in the first query ....like so:
date - version - product description - severity - module
November 29, 1999 3.6 Enterprise Encryption Ctr. Serious WebAgent
September 1, 1999 3.6 Enterprise Encryption Ctr. Moderate WebAgent
August 5, 1999 3.51 Enterprise Encryption Ctr. problem
not listed
July 13, 1999 3.51 Enterprise Encryption Ctr. Serious
Web Agent
note the "ENTERPRISE ENCRYPTION CTR." ...thats my problem...it should
be listing the right product for the product code that was given...it
does...but
it only the first record. can anyone explain why ?
++++++++++++++++++++++++++++++++++++++++
<CFQUERY Name="knownissues" DataSource="CCMast">
select *
from nxsdfct
order by defect_num desc
</cfquery>
<CFQUERY NAME="product_swap" DATASOURCE="ccmast">
SELECT dbo.nxsprodr.prod_desc
FROM dbo.nxsdfct, dbo.nxsprodr
WHERE dbo.nxsdfct.prod_code = dbo.nxsprodr.prod_code
</CFQUERY>
<table>
<tr bgcolor="#CCCCCC">
<td>date</td>
<td>version</td>
<td>product</td>
<td>severity</td>
<td>issue with</td>
</tr>
<cfoutput query="knownissues" maxrows="5">
<tr bgcolor="#iif(Currentrow Mod 2, DE('DCDCDC'), DE('CCCCCC'))#">
<td>#LSDateFormat("#entered_date#", "mmmm d, yyyy")#</td>
<td>#prod_version#</td>
(problem child)--> <td>#product_swap.prod_desc#</td>
<td>#severity#</td>
<td><cfif "#defect_type#" eq "">not listed<cfelse>#defect_type#</cfif></td>
</tr>
</cfoutput>
</table>
++++++++++++++++++++++++++
Miles.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.