ok i am trying to get this down & am running into problems
Any Help would be greatly appreciated.

First in rsStudioIN.StudioID i am trying to generate a list of id's that
where created this month
it seems to being working, but when i call rsStudioIN.StudioID in my next
Query, it only takes the first ID, Not A list...
 
but if i 
<cfloop query="rsStudioIN">
<cfoutput>#StudioID#</cfoutput>
</cfloop>
then it shows all the correct ids..?

So in the second Query i only want to display items where the
rsStudio.StudioID are not in the list from rsStudioIN.StudioID

On top of all that, if there is a better way to write this using inner or
left/right joins in one statement that would be cool to see how it works.

Thanks Again Guys.
-paul

<CFSET todayDate = #DateFormat(Now())#>

<cfquery name="rsStudioIN" datasource="kid" dbtype="ODBC">
SELECT tblKid.StudioID, tblKid.KidDate
FROM tblKid
WHERE Month(tblKid.KidDate) IN (#Month(todayDate)#)</cfquery> 

<cfquery name="rsStudio" datasource="kid">
SELECT tblStudio.StudioID, tblStudio.StuShort, tblStudio.StudioName
FROM tblStudio
<cfif rsStudioIN.StudioID NEQ "">
WHERE tblStudio.StudioID NOT IN (#rsStudioIN.StudioID#)
</cfif>
ORDER BY tblStudio.StudioName ASC
</cfquery>

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to