jokedst / CsvQuery

Plugin for Notepad++ that treats CSV files as (read only) SQL tables
153 stars 28 forks source link

multiple file tabs for query joins? #23

Closed glowworms closed 3 years ago

glowworms commented 4 years ago

Hi, is it possible to do joins against other files or file tabs?

eg.

SELECT * FROM Customer.csv INNER JOIN Orders.csv ON Customer.csv.ID = Orders.csv.ID

I know this is getting a little complex but it would be a nice feature.

jokedst commented 4 years ago

Yes, it's possible. But the table names aren't that intuitive... The first file you parse becomes table T1. The second T2 and so on. (the alias "THIS" is always the file you're currenty viewing)

So you can write

SELECT * FROM T1 INNER JOIN T2 ON T1.ID = T2.ID

On Thu, 25 Jun 2020 at 05:22, glowworms notifications@github.com wrote:

Hi, is it possible to do joins against other files or file tabs?

eg.

SELECT * FROM Customer.csv INNER JOIN Orders.csv ON Customer.csv.ID = Orders.csv.ID

I know this is getting a little complex but it would be a nice feature.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jokedst/CsvQuery/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRR3H27C2P7VXGQR35Z2LRYK7ITANCNFSM4OHX26SQ .