Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default 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

  2. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139