All posts by Galaxy Internet

Navicat 15

One of the great things about PremiumSoft, the producers of Navicat, is that they listen to the feedback from their end users. I personally have made several suggestions for improvements which have actually ended up in Navicat. In their continued effort towards excellence PremiumSoft has now released Navicat 15.


With over 100 improvements Navicat 15 continues to lead the pack. One of the new features is Smart Charts, a visualization tool do Data Analytics without ever leaving the application. There are 20 different chart types available including Scatter, Heatmap and Bar Charts.


Data Transfer is even easier with the improved transfer interface. Complicated transfers are a breeze with Navicat 15. There have been substantial improvements to the built-in Query Builder and it now supports Sub Querys, one of the features I had been waiting for. The query builder gives you a clean visual interface to build complicated query's with point and click ease. This feature alone can be a substantial time saver.


Now one of my favorite parts of Navicat has always been the built-in Data Modeler. Of it's many features, it is a fantastic tool to reverse engineer or forward engineer a database. In Navicat 15 you can now do a side by side DDL comparison and easily find differences and do synchronization.


As is the trend these days, Navicat 15 bring in Dark Mode Support. If your like me, you don't like a bright white screen blasting your eyes. You can now use Navicat in Dark Mode if you choose.


Navicat 15 is available for Windows, Mac and Linux. Download a trial version today or better yet, save yourself some time and just buy it. You wont be disappointed!

Navicat 12

Navicat has come out with a new major release, version 12. As an active user of Navicat 11, the first thing I noticed was the new Snippets feature. Navicat 12 comes with a few helpful snippets already built in, but the great thing is that you can create and save your own snippets. This feature alone will be a tremendous time saver for me as I often re-use several custom query's in my DB design process.

A simple Drag N Drop to the query window will reveal yet another great feature, text placeholders for adding your specific conditions. Version 12 now features a connection and database drop down in the query window that allows you to change the connection and DB to run the same query without leaving the query window.

A nice bonus is the snippet search that dynamically narrows the snippet list as you type your search. When you create a new Snippet you have the option of creating or selecting a Label for the snippet. What this does is basically groups your snippets so that when you select the snippet drop down filter it only shows snippets in that label group. The code completion in Navicat 12 has also been greatly improved

There are many, many improvements in this release that will improve productivity. Navicat 12 continues to be the leader in database management applications. Download a free trial!

Mysql Natural Sort Mixed Alphanumeric – Numeric Alphanumeric First

SQL:

SELECT
stock
FROM
cards
ORDER BY
IF(stock REGEXP '^[A-Z]',
CONCAT(
LEFT(stock, 1),
LPAD(SUBSTRING(stock, 2), 20, '0')),
CONCAT(
'@',
LPAD(stock, 20, '0')))

SQL SCHEMA:

— —————————-
— Table structure for cards
— —————————-
DROP TABLE IF EXISTS `cards`;
CREATE TABLE `cards` (
`stock` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

— —————————-
— Records of cards
— —————————-
INSERT INTO `cards` VALUES ('I1');
INSERT INTO `cards` VALUES ('I2');
INSERT INTO `cards` VALUES ('I3');
INSERT INTO `cards` VALUES ('I4');
INSERT INTO `cards` VALUES ('W1');
INSERT INTO `cards` VALUES ('W2');
INSERT INTO `cards` VALUES ('W3');
INSERT INTO `cards` VALUES ('W10');
INSERT INTO `cards` VALUES ('W11');
INSERT INTO `cards` VALUES ('I12');
INSERT INTO `cards` VALUES ('I13');
INSERT INTO `cards` VALUES ('I14');
INSERT INTO `cards` VALUES ('I15');
INSERT INTO `cards` VALUES ('I20');
INSERT INTO `cards` VALUES ('IC1');
INSERT INTO `cards` VALUES ('IC2');
INSERT INTO `cards` VALUES ('IC3');

"This transforms a number like '123' to '@00000000000000000123' and an alphanumeric like 'A22' to 'A00000000000000000022'. These strings will sort in the fashion you want." — NovaDenizen

SOURCE: https://www.experts-exchange.com/questions/22092935/Ordering-mixed-numeric-alphanumeric-list.html

Modified for more varied Data

mysql> SELECT
data
FROM
mytable
ORDER BY
IF(data REGEXP '^[A-Z]',
CONCAT(
LEFT(data, 1),
LPAD(SUBSTRING(data, 3), 20, '0')),
CONCAT(
'@',
LPAD(data, 20, '0')
)),
LENGTH( data ),
data;
+———–+
| data |
+———–+
| AAAA1 |
| B2 |
| D&DC1 |
| D&DC2 |
| D&DC11 |
+———–+