Puzzled by T-SQL Blog

by Itzik Ben-Gan

Solutions to the Travel Puzzle

Itzik covers solutions to the T-SQL challenge provided in his previous post. Read the rest of entry »

T-SQL Travel Puzzle

Itzik provides a T-SQL challenge involving travel related calculations. Read the rest of entry »

Largest Known Prime and the Great Internet Mersenne Prime Search

Itzik talks about the largest known prime and the program that was used to find it. Read the rest of entry »

Solutions to Proximity Puzzle

Itzik covers solutions to the proximity puzzle provided last week. Read the rest of entry »

TSQL Proximity Puzzle

Itzik provides a TSQL challenge involving matching rows based on proximity of values. Read the rest of entry »

MERGE Puzzle and a Request for Warning

Itzik describes certain use of the MERGE statement that can lead to unexpected results and points to a connect item that asks for a warning in such cases. Read the rest of entry »

Solutions to Related Tables Challenge

Itzik covers solutions to last week’s T-SQL challenge – Related Tables. Read the rest of entry »

T-SQL Challenge - Identifying Related Tables

Itzik provides a T-SQL challenge where you need to write a query that identifies tables related to an input table. Read the rest of entry »

Packing Date Intervals

Itzik describes a technique to pack overlapping date intervals. Read the rest of entry »

Moving

Itzik is moving to the USA with his family to start a new chapter in life and talks about the planned trip. Read the rest of entry »
Pages: 12NextReturn Top

advertisement

  1. Re: T-SQL Travel Puzzle

    Hi Itzik,this is a nice case of "unpacking running totals", so a solution with a single table scan c...

    --info

  2. Re: TSQL Travel Puzzle

    My bad. Just realized clustered index is over travelerid and travelstart (not milestraveled).;WITH c...

    --Pesomannen

  3. Re: TSQL Travel Puzzle

    ;WITH cteTravel(TravelerID, Destination, TotalMiles)AS ( SELECT TravelerID, Des...

    --Pesomannen

  4. Re: TSQL Travel Puzzle

    ;WITH CTE_Ord AS (SELECT ROW_NUMBER() OVER(PARTITION BY t.travelerid ORDER BY t.travelstart) AS Ord...

    --Jermy

  5. Re: MERGE Puzzle and a Request for Warning

    Syntax and behavior of MERGE statement are consistent. Warning is o.k. but it is the same level as w...

    --nilijev

  6. Re: TSQL Proximity Puzzle

    Thanks for this Steve! Just posted an entry covering the solutions: http://www.sqlmag.com/blogs/puzz...

    --Itzik Ben-Gan

  7. Re: TSQL Proximity Puzzle

    Itzik,Here are some statistics comparing my solution, Marc's, and Brad's on a relatively slow machin...

    --stevekass

  8. Re: TSQL Proximity Puzzle

    Here's another solution sent to me privately by Brad Schulz, with inline comments describing the log...

    --Itzik Ben-Gan

  9. Re: TSQL Proximity Puzzle

    Geri, your solution generates errors. Can you please fix and re-send?

    --Itzik Ben-Gan

  10. Re: TSQL Proximity Puzzle

    Just another solution:WITH CTE AS( SELECT T1.col1 AS t1_col1, T1.col2 AS t1_col2, ISNULL(T3.t2_col...

    --malpashaa

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS