SQL plugin


 

A plugin for Notepad++

It allows you to search\filter a CSV formatted text in a Notepad++ window using standard SQL queries.

 

- Display searchresult in new NPP window

- Supports standard SQL statements

 

 

A simple example for a text:

 

Email; FirstName; LastName

john@doe.com; John; Doe

mary@doe.com; Mary; Doe

johnny@doe.com; Johnny; Doe

 

A simple query against this text can look like this:

select * from data where "firstname" = "Mary"

 

 

 

Another example using space in the headerline:

Email; First Name; Last Name

john@doe.com; John; Doe

mary@doe.com; Mary; Doe

johnny@doe.com; Johnny; Doe

 

You can run queries like this to filter the text:

select * from data where "first name" = "mary"

select * from data where [last name] = "doe"

 

The SQL queries can be complexer for example:

If you have a list with files like this:

 

Size,LastAccessed,Extension,Filename

15000,2013-06-05,exe,c:\data\test.exe

1000,2011-06-05,pdf,c:\data\test.pdf

55000,2013-06-01,exe,c:\data\test2.exe

11000,2013-06-01,txt,c:\data\test1.txt

11000,2013-06-01,txt,c:\data\test2.txt

11000,2013-06-01,txt,c:\data\test3.txt

 

You can run statements like this:

(Find all files larger than 1000 and sort the result by size)

 

select size, filename from data where cast (size as integer) > 1000 order by cast(size as integer)  

 

 

 

This will be the result in a new window:

 

 

Another example:

Count how many file there are per extension:

select count(*), extension from data  group by extension

 

 

Limitations:

First,Last,Street,City,State,ZIP

"9th' at Terrace plc",Desert City,CA,00123

But this does work :

9th' at Terrace plc,Desert City,CO,00123

 

These formattings work, too:

First,Last,Street,City,State,ZIP

John,Doe,123 jefferson st.,Riverside, NJ, 12345

"John ""Da Man""",Smith,120 Jefferson St.,Riverside, NJ,54321

John ""Da Man"",Smith,120 Jefferson St.,Riverside, NJ,08075

John "Da Man",Smith,120 Jefferson St.,Riverside, NJ,08075

Steve,Tailer,"123 Suite ""At the Plaza"" road",Somewhere,SW, 12345

"'Lightning'",MCQueen,Route 66,Rapid City,IL,12345

,Blankman,,SomeTown, XX, 00123

"Jack","Smith","445 Upland Pl.","Las Vegas","NV","54321"

"Al's Cafe","Smith","123 Main Pl.","Las Vegas","NV","54321"

Joe's Inn,"Smith","456 Main Pl.","Las Vegas","NV","54321"

'Black Jack',McCloud,220 Beach Av.,Hawaii,HW,12345

 

 

The plugin is 32Bit, tested with Windows XP (32-Bit) and Windows7 (64 Bit) and Notepad++ V. 6.3.2 (Unicode)

 

 

Versions:

1.0    released 2013-05-06

 

Licence:

Free

But if you think this plugin is useful to you please 

 

 

Download:

Here

 

Installation:

Copy the .DLL to your Notepad++ plugin-folder

 

This plugin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY

 

I also have some other plugins - you can find them here

 

 


Contact:

info@Scout-Soft.com