SQL Server – Generating PERMUTATIONS using T-Sql
Were you ever asked to generate string Permutations using TSql? I was recently asked to do so, and the logic...
2013-03-11
822 reads
Were you ever asked to generate string Permutations using TSql? I was recently asked to do so, and the logic...
2013-03-11
822 reads
Generally, we try to find out records matching a certain criteria from a single or few tables. However, there are...
2013-03-06
1,011 reads
Few months back I have wrote post about moving MASTER and MSDB database to new location in stand alone machine....
2012-12-24
2,084 reads
Today, I am going to share few very useful scripts which will report us on Database Backup from different view...
2012-10-17
949 reads
Problem Statement
SQL Server has got in-built functions to convert the given string into LOWER() or UPPER() format but it does...
2012-10-14
1,309 reads
It's my bad that I did not made a post since long lately. I would not make an excuse like...
2012-09-01
1,067 reads
Introduction
Today, I would like to explain one way in which we can store the HIERARCHICAL data in SQL tables. A...
2012-03-27
2,426 reads
On many forums I have found a very basic yet important query - “How can I know when was my Stored...
2012-03-11
10,007 reads
In my previous post we see how to move MSDB database, today we will see how to move or relocate...
2012-03-08
1,064 reads
In recent past we have a situation where in we required to move MSDB, Model and Master databases to new...
2012-03-06
867 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers