Quantcast
Channel: Adobe Community : All Content - ColdFusion
Viewing all articles
Browse latest Browse all 5979

Getting what amounts to be a left outer join just has not worked for me with ColdFusion

$
0
0

Dear Sir: 

I have an issue that concerns development of coldfusion queries.  I have not had unsurmountable issues with getting SQL (in <cfquery>) to work in order to add, update, delete or join (by union and union all) records.  That said, getting what amounts to be a left outer join just has not worked for me.  Let me state at this time, that I am somewhat accomplished at MS Access and in in every case, including this scenario, I have been successful in getting the output that I seek.  But at some point I see myself moving away from Access and my having to gain expertise in SQL in a non-Coldfusion environment.

 

If you have the time to look over the two attachments, I would appreciate your time.  Note that the table I seek to create via SQL within <cfquery> is correctly dispalyed at the top of the attachment named "Correct Output and Problematic Queries.pdf".  But again, note that this table is based on several queries developed in MS Access. 

 

My first attempt to get the task completed totally within <cfquery> is via a query named Recordset 8.  While I do get the counts and ratios that I wanted, the last record of the output table is corrupted.  I never could find a revised version of the query that would correctly state the data.  So I moved in another direction.  I then created a master query named Recordset3 that pulled in all of the data for the period in question.  I then developed 3 separate QoQs based on Recordset3 - named Recordsets 4, 5 & 6 to get the counts that I needed.  Recordset7 represents my attempt to join Recordsets 4 & 5 (a limitation when joining QoQs) but I proceeded no further as the joined queries now truncated to the recordset length having the fewest records.  So I did not continue this exercise to develop yet another query to pull in both Recordset 6 & 7.  The attachment cfdump.pdf displays the output of all queries (excepting Recordset 3).

 

Obviously, I am not on the path to properly join tables in a ColdFusion environment.  This is alarming to myself because much of what I will do in the future will involve variations of joins.  Yes I could learn SQL.  That said, my desire is to stay within a ColdFusion environment.  And it is here that I am finding that such queries are easier said than done.  For instance, the CF documentation reflects that JOIN is a function.  But when researched further JOIN is accomplished using SELECT.  And hence my exercise began.

 

Thanks!  Tom

Correct Output and Problematic Queries.jpgCFDUMP.jpg


Viewing all articles
Browse latest Browse all 5979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>