sqlitebrowser icon indicating copy to clipboard operation
sqlitebrowser copied to clipboard

[Feature]: Display column data from different databases

Open Ninon77 opened this issue 3 years ago • 1 comments

Describe the new feature

Dear reader,

I have two columns that I want to display next to each other in order to plot the containing data (either in a new table or in a new view).

example: data 1: column named "4p0" in Database "Mx" table "DATA" - containing 10 values

data 2: column named "4p0" in Database "Mz" table "DATA" - containing 10 values

when I execute this command:

SELECT "4p0" FROM DATA UNION SELECT "4p0" FROM Mz.DATA

I get one large column containing all 20 values now. Which command do I need to excute in order to get two columns in one view/table?

I can save and open an sql-file (via the buttons in "Execute SQL") - is there also a way to see the history which commands I have already entered in the command window?

Best Regards

image

Does this feature exist in another product or project? Please provide a link

No response

Do you have a screenshot? Please add screenshots to help explain your idea.

No response

Ninon77 avatar Aug 09 '22 11:08 Ninon77

I don't know what OS you're using, but guessing Windows? I don't know what version of DB Browser for SQLite you're using, but guessing the latest release. Download the nightly version. https://nightlies.sqlitebrowser.org/win32/DB.Browser.for.SQLite-2022-07-09-win32.zip

Extract that .zip and find the 'DB Browser for SQLite.exe' program - just double-click it. You don't need to install it, and it won't affect the currently installed version.

image

This version is a 'in development' version, and allows two tables to be viewed at the same time.

image

In the 'Browse Data' tab, right-click in the header and select 'New data browser'. You can drag this window around, make it float or 'dock' it in various locations, eg, one above the other.

image

Obviously, horizontally is better in this instance.

So that gives you the ability to view two tables at once, which isn't quite what you're after. If you want one 'amalgamation' of the data, you can join them together using SQL. You'll have to use the 'Execute SQL' tab though.

select mx.*,mz.*
from mx
left join mz on mx.ROWID=mz.ROWID

Each table has a hidden column called 'rowId' which is the rowId for that record. You have to join the two tables together on something. This gives this

image

chrisjlocke avatar Aug 09 '22 12:08 chrisjlocke

@Ninon77 - any thoughts?

chrisjlocke avatar Aug 12 '22 05:08 chrisjlocke

Dear Chris,

thank you very much for your answer! I really appreciate it! I have now been able to create my plot like I wanted 😊

BR, Ninon

Ninon77 avatar Aug 12 '22 06:08 Ninon77

Dear Chris,

thank you very much for your answer! I really appreciate it! I have now been able to create my plot like this 😊

BR, Heike

Ninon77 avatar Oct 11 '22 07:10 Ninon77