Introduction In this blog post, we will see how to hyperlink a value in SQL Server. Additionally, we see how to interchange the value as normal link-text and hyperlinks. Hyperlink a value SQL Script IF OBJECT_ID('Tempdb..#Temp') IS NOT NULL DROP TABLE #Temp; GO CREATE TABLE #Temp (NORMAL_LINK VARCHAR(200),HYPERLINK XML); GO INSERT INTO #Temp SELECT 'https://arulmouzhi.wordpress.com/','https://arulmouzhi.wordpress.com/';… Continue reading Hyperlink a value in SQL Server
Tag: SQL SERVER
CONCAT_NULL_YIELDS_NULL in SQL Server
Introduction In this blog post, we will see What is CONCAT_NULL_YIELDS_NULL and what's the syntax to use and what are default settings of it in both Azure SQL Db and On-Premises DB. Also we will see what are the important things to know about it and how to handle our codes irrespective of CONCAT_NULL_YIELDS_NULL setting… Continue reading CONCAT_NULL_YIELDS_NULL in SQL Server
Date in Our Language using SQL
Introduction In this blog post, we will see how we can use Dates in Some of our Local Languages! Date in Our Language We can achieve this by using FORMAT Function of SQL Server. Syntax FORMAT ( value, format , culture ) SQL Script DECLARE @Current_DateTime DATETIME; SELECT @Current_DateTime=SYSDATETIMEOFFSET() AT TIME ZONE 'India Standard Time';… Continue reading Date in Our Language using SQL
Easy Like Search to find Table, View, Stored Procedure and Function Names in SQL Server
Introduction In this blog post, will see how can we easily find or search Table, View and Stored Procedure, Function names in SQL Server. SQL Script for Sample Table, View, SP, Function Creation -- Sample Table Creation CREATE TABLE TestTable ( TestTable_key INT IDENTITY(1,1) NOT NULL, TestTable_Name VARCHAR(100) NOT NULL ); GO -- Sample View… Continue reading Easy Like Search to find Table, View, Stored Procedure and Function Names in SQL Server
Import CSV and TXT Files as Tables in SQL Server
Introduction In this blog post, we are going to look how can we import .csv and .txt files as tables in SQL Server and some of the possible errors to avoid in this process. Import .csv and .txt files as Tables in SQL Server .csv file ( Comma Delimited ) .csv file .txt file (… Continue reading Import CSV and TXT Files as Tables in SQL Server
Alternate to Interesting ISNUMERIC Function Results in SQL Server
Introduction In this blog post, we are going to see what is ISNUMERIC Function in SQL server and what are the interesting result sets that it gives for some inputs and what are the other alternatives that we can use instead of ISNUMERIC Function. ISNUMERIC Function in SQL Server The ISNUMERIC function in SQL Server… Continue reading Alternate to Interesting ISNUMERIC Function Results in SQL Server
To Fetch Formatted Time from Date time in SQL Server
Introduction In this blog post, we will see How to format the time part from Date time in SQL Server. Here, we have mentioned some of the common and easy methods to achieve this. To Fetch Formatted Time from Date time Method 1 - CONVERT SQL Script SELECT GETDATE() AS INPUT, CONVERT(VARCHAR(5),GETDATE(),108) AS EXPECTED_OUTPUT; Image… Continue reading To Fetch Formatted Time from Date time in SQL Server
To Copy and Sync Database Tables Across Different Server
Introduction In this blog post, we will see How to make Copy, Sync between database tables across different Server with simple steps. We can follow the below steps and can copy or sync our Database Tables across different server and same server with different databases. Scenario we need to sync one Database table named 'States'… Continue reading To Copy and Sync Database Tables Across Different Server
Listing Comma Separated Columns instead of ‘*’ in SQL Server
Introduction In any scenarios, if we need to explicitly list out all the column names of a table instead of using '*', we can use like below Script- Sample SQL Script IF(OBJECT_ID('TestEmp') IS NOT NULL) DROP TABLE [TestEmp]; CREATE TABLE dbo.[TestEmp] ( TestEmp_Key INT IDENTITY(1,1) NOT NULL, EmpName VARCHAR(100) NOT NULL, Age INT NULL, [Address] VARCHAR(100)… Continue reading Listing Comma Separated Columns instead of ‘*’ in SQL Server
Counting Number of Occurrences of a Particular Word inside the String Using T-SQL
Introduction In this blog post, we will see how can we easily find the number of occurrences of a Particular Word inside the String Using T-SQL. Check our previous post for Finding Number of Occurrences of a Particular Character in the String. Finding Number of Occurrences of a Particular Word inside the String LOGIC The… Continue reading Counting Number of Occurrences of a Particular Word inside the String Using T-SQL