This which helps to find number of working days between two dates in Mysql. There is no specific or inbuilt function in mysql, For that we need to use the SQL query as below. [sql] SELECT 5 * ((DATEDIFF(@end_date, @start_date) ) DIV 7) + MID(‘0123455501234445012333450122234501101234000123450’, 7 * WEEKDAY(@start_date) + WEEKDAY(@end_date) + 1, 1) [/sql] For …
August 2013 archive
Permanent link to this article: https://blog.openshell.in/2013/08/find-number-of-working-days-between-two-dates-in-mysql/
Aug 25
Java Essential Tips: Automatic Resource Management
Java7 introduced many features that simplifies coding which are overhead in older Java versions. In this blog we will see the feature called Automatic Resource Management. This is really a good feature in Java7 which close the resources like IO streams automatically. Everything you need to do is implement java.lang.AutoCloseable. try-with-resources Statement try-with-resources statement simply …
Permanent link to this article: https://blog.openshell.in/2013/08/java-essential-tips-automatic-resource-management/
Aug 04
MySQL Error – SQL_BIG_SELECTS
While executing JOIN SQL query in live server, i got the following error. [code] The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay: [/code] To resolve this error, I have used the following SQL query before executing the JOIN SQL query. …
Permanent link to this article: https://blog.openshell.in/2013/08/mysql-error-sql_big_selects/