If a qry a couple of tables:

<!---get Job Property details --->
<CFQUERY Name="qryGetJobProperties" datasource="#appDSN#">
SELECT AssetID, Name
FROM FixedAssets
WHERE FixedAssets.JobID="#qryGetInvoice.JobID#" 
</CFQUERY>
<cfset PropertyFieldID = ValueList(qryGetJobProperties.AssetID)>

<!---get invoice Property details --->
<CFQUERY Name="qryGetInvoiceProperties" datasource="#appDSN#">
SELECT AssetID, Text, Amount
FROM InvoicesWork
WHERE InvoiceID="#qryGetInvoice.InvoiceID#"
</CFQUERY>

I now need a query that will extract any Asset from the Table FixedAssets that 
is included in qryGetJobProperties but not in qryGetInvoiceProperties so that I 
can display it in a dynamic form.

Something like this;
<CFQUERY Name="qryGetOtherProperties" dbtype="query">
SELECT qryGetJobProperties.AssetID,
       qryGetJobProperties.Name,
       qryGetInvoiceProperties.AssetID
FROM qryGetJobProperties, qryGetInvoiceProperties
WHERE  qryGetInvoiceProperties.AssetID != qryGetJobProperties.AssetID
</CFQUERY>

I have also tried Nested Loops and Unions but am really struggling, everything 
I try doesn't seem to make sense. I could mess about with an array but is there 
really any need? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311468
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to