[thelist] (Probably) Simple SQL Stumper.
Walker, Matthew
Matthew.Walker at cdc.org.nz
Tue May 23 19:24:14 2000
> Why would it not do so for every row
> returned by the first query?
Because it doesn't work that way. But if it did and it produced a
comma-delimited list you would have to say
FROM Image
WHERE AddrJoin IN (#GetList.ID#)
anyway. You could use
<cfset TheList="">
<cfloop query="GetList">
<cfset TheList = TheList & #ID# & ",">
</cfloop>
<cfquery name="GetOneImage" datasource="#datasource#">
SELECT ImgLrg, AddrJoin
FROM Image
WHERE AddrJoin IN (#GetList.ID#,0)
</cfquery>
But it seems like it might not be the best way.
Regards,
Matthew Walker
Canterbury Development Corporation
Christchurch, New Zealand
Tel +64-3-379 5575