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

  1. #1

    Default Combine Databases

    How do you combine databases that use two different datasouces?

    rokit1313 Guest

  2. Similar Questions and Discussions

    1. combine pages
      can you combine a number of individual pdfs and make them become a multipage document?
    2. Combine CSV files
      Hope someone can help me on this: I need to compare two cvs files that contains user profile information, but there are duplicates, what is the best...
    3. is it possible to combine jsp and php?
      here's my problem - i run a web site with a java servlet backend (apache/tomcat/linux/mysql), and i want to add some php content to my jsp pages. ...
    4. To combine or leave as is...
      My current application I am working on consists of 3 separate ASP pages. I'm posting data to each other page and using request.form to retrieve. ...
    5. Federated Databases, joins across databases etc
      Greetings, I want to do a join between 2 tables on 2 different db2 databases on the same server. I assume that I have to use federated databases. I...
  3. #2

    Default Re: Combine Databases

    Valuelist
    query of query

    Combine them how?
    Dan Bracuk Guest

  4. #3

    Default Re: Combine Databases

    rokit1313,

    The answer depends on what type of operation you need to perform and what type of database are you using. Can you provide more information?
    mxstu Guest

  5. #4

    Default Re: Combine Databases

    Do you mean "How do you combine 2 or databases into one datasource?".
    A database is real, but a datasource is more or less abstract. Roughly
    speaking,
    it's the difference between you and "Rokit1313". It is the Coldfusion
    Administrator's
    job to map databases to datasource names.

    BKBK Guest

  6. #5

    Default Re: Combine Databases

    sorry it was pretty vague. I mean. I have a table called people in datasoure1
    and a table called phone in datasource2. I have a key in the "people" table
    that i want to use to get the phone number from the "phone" database.
    Typically if they where in the same data source i would do something like this:

    <CFQUERY DATASOURCE="SameDatasource">
    Select p.PhoneNumber
    From phone p, people l
    WHERE l.id = p.id
    </CFQUERY>

    But since they are in different datasources i don't know what to do. I hope
    that makes a little more sense. thanks for the help.



    rokit1313 Guest

  7. #6

    Default Re: Combine Databases

    q1(datasource1)
    select id
    from etc

    select phonenumber, etc
    from etc
    where id in #Valuelist(q1.id)#

    If id is a char field, use quotedvaluelist

    Originally posted by: rokit1313
    sorry it was pretty vague. I mean. I have a table called people in
    datasoure1 and a table called phone in datasource2. I have a key in the
    "people" table that i want to use to get the phone number from the "phone"
    database. Typically if they where in the same data source i would do something
    like this:

    <CFQUERY DATASOURCE="SameDatasource">
    Select p.PhoneNumber
    From phone p, people l
    WHERE l.id = p.id
    </CFQUERY>

    But since they are in different datasources i don't know what to do. I hope
    that makes a little more sense. thanks for the help.





    Dan Bracuk 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