Executing SQL Queries in Notepad++ using CSVQuery


In order to run queries against .csv files in Notepad++ you will need to first make sure to get the CSVQuery Plugin installed using Plugin Admin.

CSV Query Plugin for Notepad++

Once you have the plugin installed, you should find it under Menu: Plugins > CSVQuery

CSV Query Window - Notepad++

The first thing you do is open your CSV file and open "Toggle CSV Query Window"

Let's take a simple .csv file.

Data:

Day,Visits,Sales
1,2000,10
2,2409,14
3,3405,30

Now you can execute queries under "CSV Query" as follows.

Examples:

The data is stored in an SQLite database, so you can run simple SQL queries against the tables named "THIS".

SELECT * FROM THIS
SELECT * FROM THIS WHERE Day>=1
SELECT * FROM THIS WHERE Day>=1 AND Visits > 2000
SQL Queries against CSV file in Notepad++

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap