Giter VIP home page Giter VIP logo

isf_notepad's Introduction

isf_notepad

SQL Formatter plugin for Notepad++

####Install Just download sqlformat.dll and put it into Notepad++\plugins directory and then restart Notepad++.

You can also download format option file and put it into Notepad++\plugins\Config\sqlformat. You can change options in this file to control the layout of formatted sql.

For detailed explanation of those format options, Please check document here:

https://github.com/sqlparser/sql-pretty-printer/wiki/SQL-Coding-Standard-and-Guideline

This sql formatter plugin works under Notepad++ v5.1 and later.

####Usage You can format all or any selected SQL in editor by click "Format" via Plugins->SQL Format.

You can add "Format SQL" into Context Menu by select Settings->Edit Popup ContextMenu, modify contextMenu.xml by adding this line:

<Item FolderName="Plugin commands" PluginEntryName="SQL Format" PluginCommandItemName="Format" ItemNameAs="Format SQL"/>

####NOTE In order to use this sql formatter plugin for Notepad++, you should be online. This plugin send your SQL to our SQL FaaS server here:

https://github.com/sqlparser/sql-pretty-printer/wiki/SQL-FaaS#2-api

If you don't want to send your SQL via internet, you may conside to use sql pretty printer desktop version

####Contact http://www.dpriver.com

[email protected]

https://github.com/sqlparser/isf_notepad

####Format options: https://github.com/sqlparser/sql-pretty-printer/wiki/SQL-Coding-Standard-and-Guideline

####Links: sql pretty printer desktop version

sql pretty printer addin for SQL Server Management Studio

sql pretty printer addin for Visual Studio

C client sql formatter

Java client sql formatter

sql formatter plugin for eclipse

sql formatter plugin for UltraEdit

isf_notepad's People

Contributors

cnfree avatar isfd avatar sqlparser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

isf_notepad's Issues

Case sensitive

Hi, Thanks to your code.

I'm install to my notepad++

select id from TableName

this will change

SELECT id
FROM   TABLENAME 

but I got error.

Table 'TABLENAME ' doesn't exist

windows is OK but in linux i got error.
i think that talbe name has 'case sensitive' in linux

Doesn't work of NP++ v6.7.5 on windows 8.1

I am using v1.01 of the formatter in NP++ v6.7.5 on windows 8.1.

When I try to use the formatter for the following line of SQL it does nothing whatsoever – though if I run it through your website formatter it formats perfectly.

SELECT TOP 5000 n.name_id, COALESCE(n.e_mail_address,'') as Email_address, COALESCE(n.title_code,'') as Title_Code, COALESCE(n.first_name,'') as First_Name, COALESCE(n.last_name,'') as Last_Name, n.ok_to_email, n.ok_to_sell_name,a.country_id,(MAX(li.update_dtm)) as Last_Purchase_date,(COUNT(DISTINCT li. order_number)) as Number_Of_purchases,COALESCE(n.promotion_id,'') as Promotion_Id,SUM(li.product_price) AS Life_time_spend FROM line_item li WITH(nolock) INNER JOIN names n WITH(nolock) ON li.name_id=n.name_id INNER JOIN Addresses A WITH(Nolock) on li.address_id=a.address_id INNER JOIN Orders o ON o.order_number = li.order_number WHERE n.company_id IS NULL AND li.parent_sku IS NULL AND o.Catalog_id NOT IN ('12516','STAPLES','12502','EZIBUY','EZIBUYNZ1','32211','12821','42114','JDWUK','JDWIRE','UKWHOL40','32537','32538','SKYMALL','CUTEKID','11125','11123','US208','UKWHOL40',) AND coalesce(n.e_mail_address,'') <>'' GROUP BY n.Name_id, n.e_mail_address, n.title_code, n.first_name, n.last_name, n.ok_to_email, n.ok_to_sell_name, n.promotion_id, a.country_id ORDER BY Life_time_spend DESC

Even if I try to format some really simple SQL such as the following it still does nothing:

select * from table1 where surname = 'smith' and age > 50 order by cust_id

I have also tried removing the fo.json file from the plugins/config/sqlformat folder in case that was causing the issue but it made no difference.

Input SQL is empty!

When i select the SQL and use SQL format context menu I get error as below

Input SQL is empty!

It doesn't work

I choose format and nothing happens. Whether I select the text or not. I am online. Using Notepad++ 6.9.2

SQL Format plugin for Notepad++ stopped working today

Hi. I am able to select sqlformat from the plugins menu in notepad++ but it doesn't format/change any of the code like it was able to do so yesterday. I looked through the Q&A in github isf_notepad++ - The plugin is a .DLL so the command "where.exe sqlformat" wont find it anyway. I have not made any configuration changes or updates to my machine. What do I do to fix this please?

Formatted text is inserted in focused document.

When I am formatting a big document and I change to another document before formatting is finished, formatted text is inserted in the last document.
I suppose the plugin should remember the document where it was invoked to return their results to that document instead to return to the focused document.

Regards.

Plugins does not work in Notepad++ 7.7.1

I have updated npp to 7.7.1 version, copied the sqlFormat.dll to then C:\Program Files (x86)\Notepad++\plugins:
imagen

and configured the menu

imagen

but the menu still doesn´t showing after reboot npp

fmt044_insert_column_list_start_parenthesis_in_newline is ignored

If I set fmt044_insert_column_list_start_parenthesis_in_newline to false I expect to have output of this kind:

INSERT INTO SALES.saleshistory (salesorderid,
                                salesorderdetailid,
                                carriertrackingnumber,
                                modifieddate)                   
SELECT * 
FROM SALES.salesorderdetail;

but I am receiving this:

INSERT INTO SALES.saleshistory
            (salesorderid,
             salesorderdetailid,
             carriertrackingnumber,
             modifieddate)
SELECT *
FROM   SALES.salesorderdetail; 

Example in https://github.com/sqlparser/sql-pretty-printer/wiki/Insert-statement shows that combination of options:

  • fmt040_insert_column_list_style = stacked
  • fmt044_insert_column_list_start_parenthesis_in_newline = false
  • fmt048_insert_column_list_first_column_in_newline = false

generates the output I am expecting.

What is wrong? Is there any other option I need to set to get the expected output?
Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.