Postingan

Menampilkan postingan dengan label Microsoft SQL Server

Top 5 Courses to learn Microsoft SQL Server in 2020 - Best of Lot

Gambar
Hello guys, you might know that along with Oracle and MySQL, Microsoft SQL Server is one of the most popular relational databases in the tech world. It's used in many big organizations like Investment Banks, Insurance companies, and particularly at firms that use Microsoft technologies like Windows Server. With the growing popularity and market share of Microsoft Azure, there is a good chance that the demand of Microsoft SQL Server will also increase, particularly in the cloud. There is already a high demand for both Microsoft SQL Server DBA and Programmers who have SQL Server experience, and that's why it's an excellent decision to learn MSSQL in 2020. If you also think so and looking for some awesome resources to kick-start your SQL Server journey, then you have come to the right place. In the past, I have shared a lot of free books and courses to learn Microsoft SQL Server, which was really liked and appreciated by my readers But they kept asking me about comprehensive, ...

SQL Server JDBC Error: The TCP/IP connection to the host Failed

Gambar
I had installed SQL SERVER 2014 Express edition and I was trying to connect to SQL SERVER from Java program using JDBC, but I was repeatedly getting following error: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".Error while closing connection !!null at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190) at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241) at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243) at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491) at com.microsoft.sqlserver.jdbc.SQLServerConnection.conne...

How to replace NULL with Empty String in SQL Server? ISNULL() vs COALESCE() Examples

Gambar
We often need to replace NULL values with empty String or blank in SQL e.g. while concatenating String. In SQL Server, when you concatenate a NULL String with another non-null String the result is NULL, which means you lose the information you already have. To prevent this, you can replace NULL with empty String while concatenating . There are two ways to replace NULL with blank values in SQL Server, function ISNULL() and COALESCE(). Both functions replace the value you provide when the argument is NULL e.g. ISNULL(column, '') will return empty String if the column value is NULL. Similarly, COALESCE(column, '') will also return blank if the column is NULL. The only difference between them is that ISNULL() is Microsoft SQL Server specific but COALESCE() is the standard way and supported by all major database like MySQL, Oracle and PostgreSQL. Another difference between them is that you can provide multiple optional values to COALESCE() e.g. COALESCE(column, column2, ...

Self Join Example - SQL Query to Find Employees Earning More Than Managers - LeetCode Solution

Gambar
Write an SQL Query to Find Employees Earning More Than Managers The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id as shown below: +----+-------+--------+-----------+ | Id | Name  | Salary | ManagerId | +----+-------+--------+-----------+ | 1  | Joe   | 70000  | 3         | | 2  | Henry | 80000  | 4         | | 3  | Sam   | 60000  | NULL      | | 4  | Max   | 90000  | NULL      | +----+-------+--------+-----------+ Given the Employee table, write a SQL query that finds out employees who earn more than their managers. For the above table, Joe is the only employee who earns more than his manager because Henry's Manager is Max who earns 90000 which is more than Henry's salary of 80000. +----------+ | Employee | +----------+ | Joe      | +----------+ By the way, t...

Top 5 Free Courses to Learn Microsoft SQL Server and T-SQL in 2020 - Best of Lot

Gambar
Hello guys, welcome to my blog. The Microsoft SQL Server is not just one of the popular database solutions but also one of the most complicated software offerings from Microsoft. It requires you to have a foundation in networks, databases, and programming. This wide range of skills is often challenging to obtain without rigorous learning and years of hands-on experience. Since it's difficult to learn and master the demand of expert SQL Server DBAs and Programmers are always high, particularly in banking sectors. I know many of my friends in London and all around the world become SQL Server DBAs after starting as a programmer just to work on those big banks and earn very high salaries. Even though I love SQL and also worked a lot in SQL Server, I never thought about switching sides or becoming DBA, but yes, the SQL knowledge helped a lot to me.  As a developer, I also need to run SQL queries to troubleshoot issues, generate reports, or do data analysis. Sometimes, I also need to wri...