Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7989701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:49:32+00:00 2026-06-04T12:49:32+00:00

Hello everyone it’s been some days that I use sql to make analysis and

  • 0

Hello everyone it’s been some days that I use sql to make analysis and I meet all kinds of problems that I solves thanks to your forum.

Now I’d like to create a view that recuperates the interval of time and shows in detail the dates in this interval.

I have the following table:

enter image description here

And I want to create the view that displays the result:

enter image description here

For example in the player1 MyTable to play five days from 01/01/2012
to 05/01/2012. So the view displays 5 lines for player1 with the date 01/01/2012, 02/01/2012, 03/01/2012, 04/01/2012, 05/01/2012.

Thank you in advance for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:49:33+00:00Added an answer on June 4, 2026 at 12:49 pm

    You have to create a common table expression that give you the date range ( i have created a date range of the current month but you can choice another range) :

    WITH DateRange(dt) AS
    (
    SELECT CONVERT(datetime, '2012-01-01') dt
    UNION ALL
    SELECT DATEADD(dd,1,dt) dt FROM DateRange WHERE dt < CONVERT(datetime, '2012-01-31')
    )
    
    SELECT dates.dt AS DatePlaying, PlayerName 
    FROM MyTable t
    JOIN DateRange dates ON dt BETWEEN t.BeginDate AND t.DateEnd
    ORDER BY PlayerName, DatePlaying 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone. I'm using Silverlight webbrowser control, and I'm having some problems with that.
Hello everyone I'm trying to improve my Java skills by solving some problems from
Hello everyone I've been trying to put some objects in an ASP.NET list box
Hello everyone i need some help. I'm trying to make an application for mac
Hello everyone I'm trying to make a flash uploader. The issue however that has
Hello everyone I am new to blackberry and I want a textfield that scroll
hello everyone im trying to create this tweak that copies a file from one
hello everyone it is me again! i've got few problems too. i am deveoping
Hello Everyone, I am developing an app which have to show all the restaurants
Hello everyone please guide whats wrong with this code that image is not visible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.