Viewing 8 posts - 1 through 8 (of 8 total)
SELECT ROW_NUMBER() OVER (ORDER BY NAME) Id , Name FROM
(
SELECT Id,Name FROM [dbo].[Table1]
UNION ALL
SELECT Id,Name FROM [dbo].[Table2]
)r
Pawan Khowal
_________________________________________________________________________________________________________
https://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
June 13, 2016 at 1:11 am
One more method to replace 6 consecutive digits from the input string. 🙂
--Create table and insert some data
CREATE TABLE DigitsToReplace
(
Chrs VARCHAR(1000)
)
GO
INSERT INTO DigitsToReplace VALUES ('1234ABC123456XYZ1234567890ADS')
INSERT INTO DigitsToReplace VALUES...
October 4, 2015 at 8:15 pm
There are two different sort logics used by SQL Server to handle sorting! First one is the quick sort and another one is Merge sort. It begins sort in memory...
July 1, 2015 at 9:59 pm
Hi Jeff,
Thank you very much ! Sure will try to improve on Q&As. Will update that post also.
Regards,
Pawan
May 26, 2015 at 8:22 pm
Complete list of Simple and complex t-sql puzzles at
http://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
This blog is useful for mid level developers , Strictly not for SQL Experts 🙂
Enjoy...
May 26, 2015 at 9:33 am
Check out puzzles @
http://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
April 30, 2015 at 5:58 am
You can find some good puzzles @
http://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
April 30, 2015 at 5:56 am
Viewing 8 posts - 1 through 8 (of 8 total)