Is it possible to set notepad++ as a query editor in db2 - db2

I have just installed db2 on windows 8.1 and I want to run some queries. Ideally it would be easier using an editor like notepad++ to edit the queries before running them on the db2 command line as opposed to using the db2 command line. How do I set it up?
I tried this link and it did not work for me.
https://www.databasejournal.com/features/db2/article.php/10896_3316861_3/DB2-Command-Line-Processor-Tips-and-Tricks.htm

Related

Change shortcut command in MySQLWorkbench

I regularly switch between MacOS and Windows, and use Workbench on both, but Sequel Pro on my Mac also.
I find myself hitting cmd+R in Workbench on the Mac quite regularly.
I've done my homework so far and managed to disable the command by commenting out the relevant shortcut in the main_menu.xml file from this link.
Execute statement by shortcut in mysql workbench
I was wondering if there was any way that I can get the combo to execute the SQL the same way that cmd+ENTER does, but also keep cmd+ENTER?
Eg, have two shortcuts that run the same command.
It's not possible to assign more than one shortcut to a command, however you could duplicate the execute command (say, "Run Query 1" and "Run Query 2") with the two shortcuts you want, but the same command to execute. This will produce also 2 menu entries, but that's the lesser evil I believe.

Running SQL queries in VSCode

I installed Postgresql extension in VSCode Editor. When I try to run SQL queries, it says "Language code not supported or defined". How to fix this problem?
The problem is, the code runner extension is trying to run the query, which does't support SQL queries. Try ctrl+shift+E to run the query (As available in mssql extension), or use pgsql extension, which is fixed clone of postgresql extension.

PostgreSQL installation and running through terminal

I'm currently installing postgresql to learn about databases. I'm new in this field so please bear with me. I use Windows 7 Home Premium and installed PostgreSQL under C:/. So it went well without errors. Now I want to create database using the cmd. So I write createdb 'databaseName' under C:/PostgreSQL/10/bin. But then it wants a password. I'm trying to type any text but it doesn't let me.
Now I searched for solutions and I'm in a circus right now. In the tutorial I'm watching, the instructor installed postgres using 'brew' and just installed a PostgreSQL GUI. Then he runs psql 'databaseName' to use psql commands.
Do I need to install postgres using 'scoop' in windows? or it is the same thing as using the installer from the web? I really don't know what to do now. I'm sorry if this sounds stupid for some of you :/
btw, I think the instructor uses Git Bash while I use cmd of windows
Okay, for windows users who installed PostgreSQL using an installer from web, you don't need to use the cmd instead use the SQL Shell provided by the PostgreSQL itself.

How to Launch MySQL shell script

I am testing MySQL Workbench as I could gather from the docs one way to launch MySQL from Windows Command Line as per:
http://dev.mysql.com/doc/mysql-windows-excerpt/5.0/en/windows-start-command-line.html is to look for the file installed with MySQL called "mysqld"
Now I could find the .exe file "mysqld", however when I double click it flashes and disappears.
Any idea or suggestions?
I am able to launch MySQL from its own icon, but not from the file above mentioned.
Using workbench 6.1 community
You are totally confusing the MySQL server (which mysqld.exe is) and MySQL Workbench (MySQLWorkbench.exe, another application). The MySQL command line client (which is totally independent of MySQL Workbench) can be started by opening a command window (cmd.exe) and running mysql from there (not mysqld). But as this is independent from MySQL Workbench (which is just another client, even though a much more sophisticated one), you need to call the MySQL Workbench executable if you want to run it. If you do that from a command prompt it will spit out a number of parameters you can use.

How to change the line ending used in Netbeans

Netbeans has this wiki entry on line endings: http://wiki.netbeans.org/FaqEditorEOLs
But it isn't very useful. It just says that you shouldn't develop on different OS and that's that...
In my situation however, I have no power over it. I'm on a windows machine and the PHP app I'm working on needs to end with the UNIX EOL.
There does not seem to be an option to set this for new files. Can anyone tell me where to set this?
Just saw that you can set this as a command-line startup flag: -J-Dline.separator=LF
I haven't tested this myself but I'm looking for ways to bake this into the configs somehow.
Since, a specific plug-in came out: http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=36810
I also like #JimLewis suggestion but I work on Windows with a linux virtual machine thus in some cases the versioning system line ending cannot help.
[update 201709]
I no longer use netbeans (sorry, but I need python support and it's too buggy) and almost no longer develop on windows, but #marinos-an in a comment suggests https://github.com/welovecoding/editorconfig-netbeans which uses a common setting file that can be picked up by multiple editors through plugins. Definitely interesting to try since the settings file is committable!
Have you considered managing the line endings at the version control level? Subversion,
for example, lets you set an "eol-style" attribute with values "LF", "CR", "CRLF",
and "native" (which translates the line endings stored in the repository to whatever
is appropriate for the platform where the files are being checked out, and converts
the other way when you check in.)
Please use following Netbeans Plugin
http://plugins.netbeans.org/plugin/36810/show-and-change-line-endings
fentie's answer solved my problem with line endings, as pasting multi-line MySQL from NetBeans into the MySQL command prompt caused errors.
To pass this argument to NetBeans every time it opens, add it to the netbeans.conf file:
/Applications/NetBeans/NetBeans\ 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf on OS X.
From the NetBeans Mac page under Tips & Tricks.
When I pasted multi-line SQL statements from NetBeans to the MySQL command line client on OS X or a remote Linux server, MySQL would list all possible command choices, give me some strange '> type of prompt and I was forced to hit Ctrl+C and log back into MySQL again.
For my Netbeans 12.6
I found a pluging called "Change Line Endings on Save"
https://plugins.netbeans.apache.org/catalogue/?id=31
more details are there
https://github.com/junichi11/netbeans-change-lf
once pluging installed you can configure EOL in there:
Tools > Options > Editor > Line Endings