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 8402221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:00:02+00:00 2026-06-09T22:00:02+00:00

There is attendance table like: | ATID | STID | ATDATE | PRESENT |

  • 0

There is attendance table like:

| ATID | STID | ATDATE    | PRESENT |
..........................................................
| 1    |  25  | 6/8/2012  | true    |
| 2    |  25  | 7/8/2012  | true    |
| 3    |  25  | 15/8/2012 | true    |
| 4    |  25  | 19/8/2012 | false   |
| 5    |  25  | 25/8/2012 | true    |

data is in table like above but i need it like this:

| STID | ATDATE    | PRESENT |
..........................................................
|  null  | 1/8/2012   | null    |
|  null  | 2/8/2012   | null    |
..
..
|  25    | 6/8/2012   | true    |
|  25    | 7/8/2012   | true    |
..
..
|  null  | 30/8/2012  | null    |
|  25    | 31/8/2012  | true    |

Records are less than number of days in month but i need records depends on days in month, display records which are in table and other records should be dummy.

  • 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-09T22:00:05+00:00Added an answer on June 9, 2026 at 10:00 pm

    You will need to create a calendar table with an entry for every relevant day and use that to join to your attendances table.

     SELECT CalDate,STID,ATDATE,PRESENT 
     FROM Calendar
     LEFT JOIN Attendances
     ON Calendar.CalDate=Attendance.ATDATE    
    

    This is just one of the many uses of a calendar table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a moment in my app, that I need to force to show
There is a column that exists in 2 tables. In table 1, this column
There's a Rails 3.2.3 web application which doesn't use any database. But in spite
There are nice SO question and answers about this issue, but these options didn't
There are two table s : one is the master and one the detail
I know that there are quite a few different topics out there but I
Simply what I need to do is to have a page where there is
I have two bit type columns in my sql table for the staff attendance,
I have a while() function that loops a row of data within my table.
Hi there I am desktop application developer but now i have to work on

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.