Code Monkey home page Code Monkey logo

sqlnotebook's People

Contributors

electroly 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  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  avatar  avatar  avatar

sqlnotebook's Issues

Need help exporting to .csv

I have a txt file with 9M rows. I want to import it, group by zip code and then export it to csv with the 38K rows that remain. Everything works as desired until I try to export. Two things seem to happen:

  1. The first column converts from text to alphanumeric. How do I prevent this?
  2. The table seems to truncate at around 10% of the rows, not always in the same spot so I don't think there is something odd in the data.

Thoughts?

Thanks,

Craig

Column datatype assignment

It would be great if the datatype of multiple columns can be changed in bulk instead of clicking on each column and changing the datatype when importing csv files for that becomes very tedious with tables of many columns

Allow storing a table in a variable

Currently variables can only hold single scalar values or array.

Set $val = (FROM * FROM Mytable) dosn't work.
Set $val = (SELECT name FROM MyTable) only uncludes the first found value.

Make variables able to hold table-like data, for example:

Set $data = (Select name, email From Users Where status='online') As table
For Each $data As $Row
Begin
    Print printf('User: %s \tEmail: %s', $Row.name, $Row.email)
End

(I now, For Each is currently not available)

Or let variables pointing to tables, eventually temp tables. So you can create a temp table of a (Select * From Blah) Statement and let the variable pointing to this table.

Error when joining local and remote (SQL Server 2008 R2) tables

When executing a join where table aliased as "a" is a local table and the table aliased as "b" is a remote SQL Server 2008 R2 table, an error is displayed:

SQL logic error or missing database

However, when the remote table is deleted and them re-imported as a local table, the query executes successfully.

The query syntax did not change, only the table import method changed.

select a.pro_number from ceva_csvfile a inner join ceva_cisdata b on a.pro_number = b.pro_number;

Also, when the table was a remote table, I double checked that the table was in fact accessible, by double clicking the table name in the left pane of SQLNotebook (under tables heading) in order to view the data.

error connecting to SQL Server that is fully case sensitive

When trying to connect to our SQL server instance, using windows authentication, I get the error on first attempt:
The conncetion to Microsoft SQL server failed.
Invalid object name 'information_schema.tables'

I can relate the error directly to our sql server environment being case sensitive, in which the valid expression should use 'INFORMATION_SCHEMA.TABLES', instead.
image

Allow Script Execution at certain events

Let the user define script that would be run at certain events, eg. OnNotebookOpen or OnCreateNewNote, etc.

For me, i would use is to drop/clear some tables and refill it with csv data from network shares.
Script used for events should be marked, so the user don't delete them by mistake.

issue when press ctrl+s shortcut multiple times

I usually use shortcut to save notebook, If I press ctrl+s 2 times, there will be DC3 in scripts
I guess you control the menu item to not allow save multiple times, but shortcuts is not.

ๅ›พ็‰‡

Console: prevent left/right arrow key from escaping input area

We should prevent the user from arrowing left from their command into the prompt and before. They should have to use the mouse to click in the backlog in order to move the cursor there. Also we should prevent the user from arrowing right into the newline after the prompt.

Import file with separator other than comma?

Almost all the csv files I see in practise use tab or semicolon as delimiter. Maybe this is because in Europe the comma is used for decimal separator (as opposed to USA).

For csv datasets, the file import should at least support and detect comma (,) semicolon (;) and tab (\t) imho

SPLIT() is not working properly

Please try below code :

DECLARE @DaTa = SPLIT('AAA|BBB|CCC', '|', 1);
select @DaTa

Expecting the result as 'BBB' as per your documentation where we are getting 'System.Byte[]'

Enhancement : Transclude SQL Results in Notes

Copying table from console output to notes is becoming invalid over a period of time when the underlying data changes.
So, it would be good in notes if we add a custom SQL widget and provide custom SQL query (only allowing select query from table or view is enough) then notes should get updated dynamically (maybe on manual refresh because dynamic refresh might need more resources).

In this way, this notebook will become a tough competitor for the Jupyter SQL notebook. Hatz off @electroly :-) For this awesome tool.

Error about delete.lst at startup

The process cannot access the file 'C:\Users\brian\AppData\Local\Temp\SqlNotebookTemp\delete.lst' because it is being used by another process.

Unable to save SQL Notebooks due to "Object reference not set to an instance of an object."

As the title says I'm unable to save Notebooks due to the error "Object reference not set to an instance of an object.". This happens after hitting Save or Save as... and selecting a save location.

image

It's rather unfortunate, as I lost all my progress in creation of a notebook. I was able to save Notebooks as long as there were only tables in them I believe, but I am not 100% sure about that.

EDIT: I tried 1.1, 1.2 and 1.2 portable, the error is the same for all of these. I am running a Windows 10 PC.

Console not working for me

No matter what I try, I can't get the console to do anything. Am I doing something wrong?

sqlnotebook_2017-05-11_08-22-43

Putting the same commands in a script window and pressing f5 does work, however.

Print a notebook

First off, many thanks for the wonderful tool. Next, unless I am missing something blindingly obvious it appears that there is no way to print a notebook page or to convert it to a pdf. Is this something that will be on roadmap or the only way to share a notebook I create is for another person to read it through sqlnotebook which would require installing it and is not always an option for some recipients working in restricted environments.

Import XLS not supported

When using the menu option Import > From File.... and then choose an XLS or XLSX file the dialog "XLS import not supported" is displayed.

When using the import statement IMPORT XLS 'myfilename.xls' INTO tbl1 it works as expected.

sqlite sql CTE function failure

Nice for version 1.1.0 which includes the load_extension support.
I try it and the result well
Another bug while try the window function.
Add the script with window function And it show "Not a statement.
2022-03-09_103913
"
I try with DB Browser for SQLite and the execution of the sql statement is OK.
What is the problem of sqlnotebook, cause the CTE function is native within sqlite?

Support variables in the place of table names in standard SQL queries

I'm trying to export some data to text files:

Declare $TablesCount = (select count(name) from sqlite_master where type='table')

Declare $TableName
Declare $FileName

For $counter = 0 To $TablesCount-1
Begin

    Set $TableName = (Select name From sqlite_master Where type='table' Limit 1 Offset $Counter)
    Set $FileName = printf(D:\Data\Clientlists\SW - %s.txt', $TableName)
    
    Print printf('Exporting names from %s to %s', $TableName, $FileName)
    EXPORT TEXT $FileName FROM ( SELECT Name FROM $TableName )

End

Some hints to get it working? Is there a better way to do so?

Unable to open json file

Hi team,

I am trying to open json file and getting below error.

The file type .json is not supported.

sqlnotebook

Virus Detected by McAfee Scanner

Hi,

I downloaded your latest version of SQLnotebook and my installation of McAfee Antivirus scanner detected a virus within the package. I used the link provided on your web site and it was the portable version which I was downloading.

Hope this helps.

Custom CSV delimiters

Importing delimited files should allow specifying a custom delimiter, otherwise I have to preprocess delimited files into csv before importing.

Markdown support and plot function

What a wonderful work of sqlnotebook, just like python notebook
May ask for some request?
(1)sqlite load_extension
When I want to load extension for additional function, I cannot use load_extension sqlite function for statistic calculation that Anton Zhiyanov gather and compile.
https://github.com/nalgeon/sqlean
(2)Markdown Support for text block
(3)May be plot function in the future
Thanks!

TABLESAMPLE on import fails for views

Importing data from a view causes a select query with a TABLESAMPLE clause to be run against that view which causes the following error:

The Import Failed
AdoCreate: The TABLESAMPLE clause can only be used with local tables

Fonts/colours

A nice to have would be to customise the grid fonts (Consolas, monospace, etc) and/or colours.

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.