Ask a Question related to Coldfusion Database Access, Design and Development.
-
T McDizzle #1
I need much help
I have one query that is pulling a name and id from table 1 in database 1 and
another query pulling a rating and id from table 2 in database 2. I am using
coldfusion to output the data and current i have a 3rd query that queries the
second query and gets a rating for a given name as part of an iterative
<cfoutput>. I can sort the ouput of the table by name because it is the source
of the output, but I can't get it to sort that same list of names from by
rating because having that data sort does no good because the output is the
name query and its going to go through that list. Rating information is not
available in table 1 or database 1 for that matter so a join won't work. What
should I do to resolve this?
T McDizzle Guest
-
Ian Skinner #2
Re: I need much help
T McDizzle wrote:
Rating information is not available in table 1 or database 1 for that
matter so a join won't work.
Are you sure. Where do the databases live. If they are are on the same
database server, or can be connected to each other over the network it
may be possible to write a join query. It would usually look something
like:
SELECT fields
FROM database1.table1 JOIN database2.table2 ...
WHERE criteria
Depending on the exact DBMS there may be users and/or scheamas between
the database names and the table names.
If is not available or is too difficult, you should also be able to use
an query of query to join the first two queries before your output.
As long as you are not on too old of a version of ColdFusion.
Ian Skinner Guest



Reply With Quote

