How to?: Query two postgreSQL TABLES, filter to create and update a single combined TABLE #8734
Replies: 4 comments 16 replies
-
Hey @PaulRossAclear If the tables are in different databases, then naturally there's not going to be a convenient way to join these tables, as far as I'm aware. What you may need to do is form "soft" relationships where you have an ID field in one table that matches the primary key of the other, and then you can use filters on your data providers to get related rows. |
Beta Was this translation helpful? Give feedback.
-
Yes, I verified the code will produce a random number string. My goal is to
have it populate the fields of the selected rows but it is just crashing
the program.
…On Thu., Nov. 24, 2022, 12:19 a.m. melohagan, ***@***.***> wrote:
Hey @PaulRossAclear <https://github.com/PaulRossAclear>
Just to double check, your JavaScript binding is returning the random
string, e.g.
function randomString(length, chars) {
var result = '';
for (var i = length; i > 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))];
return result;}return randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
—
Reply to this email directly, view it on GitHub
<#8734 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4DALENQCQSKGXOQ7XXEZV3WJ4QKFANCNFSM6AAAAAASFNTQBU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If you are trying to search 2 databases at once you can use a form insert dataprovider and data and within that data provider and data have a second data provider and data (2nd database to search/filter through. the form can use form fields to filter results with both. I do this with looking for vehicles, I use 1 database to filter the other. When binding I use "like" instead of "equals" to help with spelling errors from others as well simple syntax errors. |
Beta Was this translation helpful? Give feedback.
-
If you are wanting to merge the 2 databases then within the form mentioned above have action buttons alongside your tables, have the action fill out empty form fields on the screen (hide them if needed) and 1 final button that takes current fields and creates new database. It becomes a 3 click solution but it at least merges your databases. |
Beta Was this translation helpful? Give feedback.
-
Edit: Edited the Topic and comments to clarify the distinction between table and database.
We have been able to connect two postgres data bases but only able to query one database at a time using a screen tool. Need assistance with query multiple database and filter for specific results. Once the desired records form each database have been identified, would like to create a combined database that will also be a postgres database. Most helpful then would be to create a unique identifier for each combined record in the new database preferably a randomly generated rather than sequential. This can be manually managed. eg. user queries both databases, selects desired results and commits to new database with unique randomly generated serial so that in the new database these records are tied together. It may be helpful to have the source databases appended with this unique id so that they can be identified as having been "matched" and can be found in the new database.
More background:
The concept is to tie multiple records together for a subject. ie. for analysis of real estate. A home may be sold several times and those listings may be recorded on a MLS service and a tax records database. The MLS records and the tax records may not match and often the tax records lag behind the MLS, so depending on the date of collection the data may not yet be posted. The MLS also may be recorded as sold when in fact it did not. The transaction may be worth analysis but it should be identified correctly. They may also have been listed for rent at various times so these records need to be recorded and tied into a search. More functionality and features are planned but this most basic step of creating the database of tied records, we feel is the most critical element.
Beta Was this translation helpful? Give feedback.
All reactions