Question

Query of Queries and Join Not Working

Asked by: tfstarks

Hello, it's the thankful Reverend again. However, as thankful as I was on Friday, today, I'm still singing the blues. While the solution I got Friday did indeed work partially, without a fully working join, it only returns one record. So, doing my best to piece it together, I've come up with the following code, but it keeps earning me a "query of queries syntax error" in CF having to do with the line that the 'join' is on (always involving the word following "FROM"). Any ideas why?:

<cfquery name="Q1" datasource="#DATA1#" username="#USE1#" password="#PASS1">
    SELECT
        AppID, AppAcronym, AppPriority, AppType, AppStatus
    FROM
       ASQLserverDB
</cfquery>

<cfquery name="Q2" datasource="#DATA2#" username="#USE2#" password="#PASS2">
    SELECT
        SysName, SysStatus, SysType, SysOS, SysOSType, AppID
    FROM
        AnOracleDB
</cfquery>

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType

   FROM    Q2 RIGHT OUTER JOIN
               Q1 ON Q2.AppID = Q1.AppID      
</cfquery>

Since only one person went after the question last time, I'm guessing this is really a hard thing, so I'm going to assign the whole 500 points to it again. Thanks for all your "views" and any help anyone cares to offer!

RTFS

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-08-29 at 11:50:04ID21543840
Tags

query

,

join

Topic

ColdFusion Application Server

Participating Experts
3
Points
500
Comments
25

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. CFQuery
    Hi, I want to build a pre-SQL string to be used in a CFQUery statement, but for some dumb reason I always get an error. The code is something like this: <cfset vSQL = "SELECT * FROM mytable"> <cfquery name="Page" datasource="namshop" dbt...
  2. Cfquery not working
    Hi My code below is not working. Example, <cfquery name="Get_Pending" datasource ="CD_Music" dbtype="ODBC"> Select * from Sales_Order Where Delivery_Flag<> "Y" </cfquery> It has compilation error. Pls...
  3. Aggregate sql functions with dbtype=query
    Can one use aggregate functions in an sql query on a query with a dbtype query? Here is a my promblem code: <CFQUERY name="getapps" DATASOURCE="gradstudy"> SELECT ID, decision, status FROM apps WHERE Term='Fall' </CFQUERY> <CFQUERY ...
  4. CFQuery CurrentRow Function
    I am trying to filter a CFQuery with the results of another CFQuery. Is there anyway to do this???

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: andw928Posted on 2005-08-29 at 12:00:06ID: 14778260

Find

   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType

   FROM    Q2 RIGHT OUTER JOIN
               Q1 ON Q2.AppID = Q1.AppID    

Replace With:

   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType

   FROM    Q2, Q1
    WHERE q2.appid = q1.appid

Unfortunately, outer joins are not supported by CFMX query of query.

 

by: andw928Posted on 2005-08-29 at 12:07:28ID: 14778328

And it is a shame that it doesn't support outer joins, but the above example is very similar, using an INNER JOIN, the different between the two is the fact that appid in Q1 and Q2 must exist for a record to be returned using an INNER JOIN. So if q1.appid has a value of 3 but q2 doesn't have a 3 for appid, it won't return that row whatsoever, since q2 doesn't have the value of 3 for appid in any of its rows.

But with OUTER JOINS, it returns NULL if it cannot find the same value in the second table that is being joined. Only inner joins are supported by Coldfusion Queries of Queries, and should work out well for you.

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType

   FROM    Q2, Q1
               Q2.AppID = Q1.AppID    
</cfquery>

Goodluck!

 

by: mrichmonPosted on 2005-08-29 at 12:11:36ID: 14778367

andw928 is correct in that OUTER JOINS are not supported.

But an INNER JOIN is a wrong answer and will not give you what you need.

Instead you have two options

1) Best option - do the outer join in Oracle.  It can do it and from the above code I see no reason why you can't let Oracle do the join.

2) Manually do the work of the query of queries.  You manually create a query object and construct the outer join results.  This is very painstaking, but if you can't let the DB do it for you it is an alternative.  Let me know if you need sample code on how to do this.

 

by: andw928Posted on 2005-08-29 at 12:15:19ID: 14778412

He can't do the join in Oracle, it is 2 datasources and 2 different DBMS's. What's wrong with the INNER JOIN? The fact that it won't return a row if the same appid doesn't exist in both tables is a given, that's the reason for the INNER JOIN. I think tfstarks, has same appids in both queries.

Also, if he doesn't he can do inner join, and then we can think of some light-weight code to get the rows that don't correspond to each other in both tables.

 

by: tfstarksPosted on 2005-08-29 at 12:59:10ID: 14778797

UNfortunately, you are both right - neither is working. When I reconfigured the query using the "inner join" syntax as follows, I got almost the same error I was getting before. The code and the error are below. I'm at my wits end, and am leaving for the day. I'll check back in later tonight to see if yall had any ideas....any of which are greatly appreciated...afterall, I've got to believe I'm not the only person in the world who is trying to get this kind of solution to work...am I? Oh, and "andw928", just FYI, I tried doing it "exactly" as your example, but that only returned multiple duplicates of a single record, so I must have done something wrong there too, because there are literally hundreds of distinct records that this query should return.

HERE IS THE REVISED CODE (the first two parts didn't change so I'm not including them again):

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS, Q2.SysOSType
   
   FROM  Q2 INNER JOIN
         Q1 ON Q2.AppID = Q1.AppID
</cfquery>

HERE IS THE ERROR TEXT:

Query Of Queries syntax error.
Encountered "INNER" at line 0, column 0.  

20 : </cfquery>
21 :
22 : <cfquery name="Q3" dbtype='Query'>
23 :
24 :    SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS, Q2.SysOSType

--------------------------------------------------------------------------------
SQL    SELECT Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS, Q2.SysOSType FROM Q2 INNER JOIN Q1 ON Q2.AppID = Q1.AppID  

 

by: mrichmonPosted on 2005-08-29 at 14:05:37ID: 14779321

A good thing to consider is can you have the SQL server create a linked server to the Oracle server.  Then you can do it all using the SQL server datasource.  Let me know if this idea sounds interesting...

Basically to do this you would have to have access to the SQL server.  Then you create a connection to the Oracle server.  Then in SQL you can access like this:

<cfquery name="Q1" datasource="#SQLDATASOURCE#" username="#USE1#" password="#PASS1">
    SELECT
        SQLtable.AppID, SQLtable.AppAcronym, SQLtable.AppPriority, SQLtable.AppType, SQLtable.AppStatus,
        Oracletable.SysName, Oracletable.SysStatus, Oracletable.SysType, Oracletable.SysOS,  Oracletable.SysOSType
    FROM
       ASQLserverDB SQLtable
       LEFT OUTER JOIN linkedservername.schema.owner.tablename Oracletable
      ON SQLtable.AppID = Oraclertable.AppID
</cfquery>

I made everything wordy there just to show how it would be accessed, so I used aliases as well.

Let me know if this doesn't make sense or if you need more details to try it out.

 

by: andw928Posted on 2005-08-29 at 14:11:03ID: 14779373

Can you post the output of Q1 and Q2 seperattely? Post like 10 records from each one, I want to see how it looks like. If you can post the entire queries that would be good too.

 

by: mrichmonPosted on 2005-08-29 at 15:05:34ID: 14779759

Also here is the by hand example:  (WARNING - it is messy and I would use as a last resort, but have had a need once before where it was the only option)

<cfset Q3 = QueryNew("AppID,AppAcronym,AppPriority,AppType,AppStatus,SysName,SysStatus,SysType,SysOS,SysOSType")>

<cfloop query="Q1">
  <!--- Add new row to the query --->
   <cfset newRow = QueryAddRow(Q3)>
    <!--- Add in each column in current record from Q1 --->
    <cfset Temp = QuerySetCell(Q3, "AppID", Q1.AppID)>
    <cfset Temp = QuerySetCell(Q3, "AppAcronym", Q1.AppAcronym)>
    <cfset Temp = QuerySetCell(Q3, "AppPriority", Q1.AppPriority)>
    <cfset Temp = QuerySetCell(Q3, "AppType", Q1.AppType)>
    <cfset Temp = QuerySetCell(Q3, "AppStatus", Q1.AppStatus)>
    <!--- See if any matching records in Q2 as would happen in an OUTER JOIN --->
    <cfloop query="Q2">
        <cfif Q2.AppID EQ Q1.AppID>
            <!--- Add columns from record that matches --->
               <cfset Temp = QuerySetCell(Q3, "SysName", Q2.SysName)>
               <cfset Temp = QuerySetCell(Q3, "SysStatus", Q2.SysStatus)>
               <cfset Temp = QuerySetCell(Q3, "SysType", Q2.SysType)>
               <cfset Temp = QuerySetCell(Q3, "SysOS", Q2.SysOS)>
               <cfset Temp = QuerySetCell(Q3, "SysOSType", Q2.SysOSType)>
               <cfbreak>
        </cfif>
    </cfloop>
</cfloop>

You may want to add in so that NULL or blank or default values get added if no record is found in the left join search portion - I didn't add that because it depends on your needs on what would go there.  It would be safest to add blanks if you aren't sure... Then you won't get errors.

But as I said I would still stick with the Linked Server if that is an option first.  Or even if not I thought of one other thing.

You can use an OPENQUERY on the SQL Server if you can write a stored procedure.  Then you can have SQL read the values from Oracle into SQL server - do the outer join there and basically have only one query from CF to the SQL server.  Open queries are very easy and require less access to teh SQL server - only the ability to do stored procedures - so it may be easier to implement.

Many options - let me knwo whic way to explore and I can give more details that you may need.

 

by: andw928Posted on 2005-08-29 at 15:12:12ID: 14779802

I don't know about mrichmons solution with large data, you are basically looping x times where x is the number of records in query 1 * the number of records in query 2. Imagine 100 records in 1 and 1000 in the other = 100,000 loops! That's not mentioning the other stuff that is happening within that loop itself!

It may work though. Post us the data returned from Q1 and Q2. So we can inspect it.

 

by: mrichmonPosted on 2005-08-29 at 15:48:04ID: 14779981

Yes it is a very bad solution the larger the data gets.  It is also putting the job of T-SQL into CF which is not a good idea if you can help it.  Basically it is trying to code by hand what a join does.  It does work, and if it is the only way to get teh results you need then that has to take priority over efficiency.

As I said - one time I had no other option due to limited server access so it was a last resort.  

However, as I mentioned I think the other two options (linked server or OpenQuery) are better options - you are letting the database do what it was designed for.

Anytime you can have the database do a join it is better than even a query of queries for large datasets.

 

by: tfstarksPosted on 2005-08-29 at 17:17:19ID: 14780543

Gentlemen, I'm sorry you are working on this without some significant background. But, I thought that by telling you that the data was coming from two different places would be sufficient. I was wrong. I am in a highly restricted environment. I have no access to administration, only development via named datasources in an "application.cfm" file. One named source is an Oracle DB and one is a SQLServer. Both have multiple tables that I need to run multiple queries on. According to the way this environment is set up, I HAVE TO be create my queries in CF, meaning that I must join them somehow. This means no linked servers or other forms of procedural queries that we would normally use in the DB clients. That is why I am turning to you CF experts - I need a miracle.

Reverend Tom on his knees.

 

by: andw928Posted on 2005-08-29 at 17:44:19ID: 14780635

Example of the data returned from both queries would help! the INNER JOIN syntax I showed was supposed to work. There has to be something wrong with teh data returned from Q1 or Q2.

 

by: andw928Posted on 2005-08-29 at 18:10:58ID: 14780727

tfstarks, you can't use the word INNER JOIN whening using an INNER JOIN in a QofQ:

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS, Q2.SysOSType  
   FROM  Q1, Q2
   WHERE Q1.AppID = Q2.AppID
</cfquery>

<cfdump var="#q3#">

You have to use the WHERE clause for INNER JOINS in Queries of Queries. Have you tried the exact above code? Explain more of what it is returning and what it should be returning instead.

 

by: Jerry_PangPosted on 2005-08-29 at 18:45:05ID: 14780838

why not combine the two queries?
so instead of all those 3 queries,

from
<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType
   FROM    Q2 RIGHT OUTER JOIN
               Q1 ON Q2.AppID = Q1.AppID    
</cfquery>

to:
use this instead?

<cfquery name="Q1" datasource="#DATA1#" username="#USE1#" password="#PASS1">
    SELECT
        Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus,
        Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS, Q2.SysOSType
    FROM
         AnOracleDB Q2 RIGHT OUTER JOIN
        ASQLserverDB Q1 ON Q2.AppID = Q1.AppID    
</cfquery>

 

by: andw928Posted on 2005-08-29 at 18:46:15ID: 14780847

You can't he is using 2 datasources from 2 different database managements servers. Oracle and SQL Server.

 

by: mrichmonPosted on 2005-08-29 at 19:17:52ID: 14780969

Then in this situation you will need to use the manual method.

This is the only way to get the same results as when using an outer join.

 

by: andw928Posted on 2005-08-29 at 19:22:28ID: 14780994

tfstarks, do any of the 2 queries return an APPid that is not the same in the other query? In other words, do both queries return the same Appids, or is there an instance where 1 query might be missing the appid given by the other query?

 

by: Jerry_PangPosted on 2005-08-29 at 23:10:31ID: 14781862

hehe.. i see.. ive never read the next comments.
even inner joins and outer joins are not supported.
not even subqueries.... :(
use only old simple sql statements using where clause and = clase.

as they have said, you will have to do it manually.
either loop through each records and do a lookup (yuck - no choice.)

or

find a different SQL statements to comeup with the same result...
hm.. lets see.. i wonder if *= (for right join) is still supported like

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType

   FROM    Q2 , Q1
WHERE
               Q2.AppID *= Q1.AppID    
</cfquery>

you have to find an alternative to right join.
not sure if the following will give the same result.
subqueries are not supported.. oh bugger.

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType

   FROM    Q2 , Q1
WHERE
               Q2.AppID = Q1.AppID    
OR
               Q2.AppID = Q2.AppID
OR
               Q2.AppID = null
</cfquery>


SQL syntax for query of queries
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/using_39.htm#wp1175636

 

by: Jerry_PangPosted on 2005-08-29 at 23:15:18ID: 14781870

hmmm.. just curius.. probably

both q1 and q2 then result is
 q1,q2
only q1 then result
 q1,nulls
only q2 then result
 nulls,q1
and you need "both q1 and q2 " and  "only q2"

probably...  (not sure)

<cfquery name="Q3" dbtype='Query'>
   SELECT  Q1.AppID, Q1.AppAcronym, Q1.AppPriority, Q1.AppType, Q1.AppStatus, Q2.SysName, Q2.SysStatus, Q2.SysType, Q2.SysOS,  Q2.SysOSType
   FROM    Q2 , Q1
WHERE
               Q2.AppID is not null
</cfquery>

 

by: tfstarksPosted on 2005-08-30 at 05:20:50ID: 14783670

'mrichmon', what do you mean when you say, "the manual method"?, and

'andw928', yes, I did use your exact code, and I'm sorry I didn't say that I did, because I thought I had when I mentioned that all it did was return hundreds of records of duplicates of the same record. And yes, I know from doing this in my SQLServer client that there are many distinct records that this query should return. Here's the example output from your query...just imagine it repeated several hundred rows worth. :-)

AppID     Acronym   DR Pri    App Type   App Status      Sys Name       Sys Type      Sys Status        Sys OS            Sys OS Type
   3          ABCDE        6          APPL             DEV             DLRP2           SERTX         Inactive       SUN SOLARIS         SOLARIS

In answer to your other question, 'andw928', "Oracle" is a System database, so there are far fewer "AppIDs" per record, still, I'd say, that 2/3 of the records have the AppID field populated, whereas it's a mandatory field for the SQLServer table...being that it's the key field for that table. Therefore, yes, therefore, the chance that records are going to exist without appids in Q2 is very high. VERY HIGH. Hence the reason I wanted to do the outer join using Q1.

Thanks again everyone, I'm still looking for my miracle! It's a brand new day!

Rev. TFS

 

by: tfstarksPosted on 2005-08-30 at 06:40:49ID: 14784298

Forgive me 'andw928'!!! Your solution did actually work! When I went back and plugged in the "<cfdump>" tag, then it returned the individualized results. So, you get credit for the solution. I'll go back and accept the answer. However, I'm still at a loss as to know how to know format my results into recognizable tables! Oh God, if its not one thing it's another, eh, guys? Oh well, at least I've got this hurdle crossed, and I've got you to thank for this particular miracle! Thanks again for putting up with this particular 'messenger'.

Thankful Tom

 

by: andw928Posted on 2005-08-30 at 07:00:47ID: 14784509

Not a problem. I knew that join had to work, but if you say there are fewer AppIDs per record in the System database then you can still be returning partial records instead of everything. Just post here if you still have problems with something.

 

by: tfstarksPosted on 2005-08-30 at 08:40:27ID: 14785842

Say, I'll take you up on that offer 'andw928'. Is there anything else you can tell me about that "<CFDUMP>" tag? I've been all over Google, EE, CF, LiveDocs, and a few other places this morning trying to hunt down examples of how to use it to format result sets, but I keep coming up dry...or at least not with what I'm expecting. Is there a "<CFDUMP>" formatting resource that you, or anyone else reading this who might feel charitable, might point me to? I'd certainly appreciate it. Otherwise, I'm going to have to go back to the drawing board because I have strict parameters in which I need to display the results, and I know I'll be able to do that once I figure out how to format this "<CFDUMP>" to let me do that. It's just a matter of finding the proper CSS or parameters or something, and if yall have pointers to that, I'd sure appreciate you throwing them my way!

Thanks again!

RTFS

 

by: andw928Posted on 2005-08-30 at 08:45:15ID: 14785906

No, cfdump is just a debug tag, it basically shows what the query returned. You can get the exact same results if you output the query using <cfloop> or <cfoutput query>. <cfdump> basically just shows the contents of a structure, array, variable, or query. You can use cfdump on basically any Coldfusion variable that comes to mind. For example, if you go to this page:

index.cfm?page=1&id=730

Then do: <cfdump var="#url#">, you will see the page and id and the values for both of these, since anything in the URL is in hte URL structure. You can dump forms, queries, whatever comes to mind, it is a fast debug tool.

Once you know what you want to do, you don't use cfdump anymore, instead you can loop the contents of that join that you have:

<cfloop query='q3'>
    #appid# - #sysname#<br />
</cfloop>

The cfdump tag is there to help you, it is for debugging.

 

by: andw928Posted on 2005-08-30 at 08:45:31ID: 14785910

It is used to show you the contents of an array, structure, query, or variable.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...