Database

SQL_server_delete_script

Script to delete records from multiple tables in SQL Server

1

In SQL Server many times we need to delete data from multilple tabels. Such as we may need to delete the records from “Base Table” or a “View”. I know everyone just hate to create a multiple queris, we just want a single query or a script which will does a job for us. For this I have created a small script. You just need to make bit modification as per your need.

# Just copy paste the code and hit F5

(more…)

Finance

Get Financial Fiscal year [SQL function]

0

User defined functions are very handy in computer languages. It helps to achieve the exact output that we want. Generally these function exists for specific purposes E.g. to get the age of users or for Comma-Delimited Searches etc etc.

Today in this post we will see User defined function to get Financial Fiscal year from SQL Server.
# Copy and paste following code in SQL window and press F5.

(more…)

Table Count

Script to get Record count from multiple tables in SQL Server

0

Table CountMS SQL Server is a very popular database. I’m sure you must work on it. Microsoft provides everything in it. Still there are many things that we have to manually. Such as we may need to get the record count from all the tables present in the Database or only for the “Base Table”. It seems very small but its a bit time consuming. For this I have created a small script. You just need to make bit modification as per your need.

# Just copy paste the code and hit F5
(more…)

User Defined Function to Get Count of the words from a String in MS SQL Server

2

Today we will see a simple User Defined Function to Get Count of the words from a String in MS SQL Server. I know you all must have done this before but its gonna be a pretty interesting because we are doing it from SQL. So lets start now…

(more…)

User Defined Function to Check Leap Year In MS SQL Server

1

To find out Leap year is use to be a small assignment. Its a very popular question and I’m sure we all have done it from different different programming languages. We all have used some predefined functions to solve this. Today we will see how to write a User Defined Function for checking Leap Year but from MS SQL Server.

(more…)

Go to Top