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

  • Home
  • SEARCH
  • 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 5989753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:08:48+00:00 2026-05-22T23:08:48+00:00

I’m generating a line-shift report: In my application, I’m providing a dropdownlist for selecting

  • 0

I’m generating a line-shift report:

In my application, I’m providing a dropdownlist for selecting shift and line and they will select a date from calender

I have 3 shifts

  • shift1 starts at 7am and ends at 3pm
  • shift2 starts at 3pm and ends at 11pm
  • shift3 starts at 11pm and ends at 3am

I have a table called datalogging where login information will be stored as shown below:

Name       Shiftname       ID          operatorname   Date           plantname    line     Machine
Pradeepa  Shift2(11-7)     3           Operator 3     2011-05-28     Plant 3      Line5    mc10
Ashwini   Shift1(7-3)      1           Operator 1     2011-05-29     Plant 3      Line6    mc12
Deepika   Shift2(11-7)     2           Operator 3     2011-05-29     Plant 5      Line9    mc18
Ashwini   Shift1(7-3)      1           Operator 1     2011-05-24     Plant 1      Line1    mc1
Deepika   Shift2(3-11)     2           Operator 2     2011-05-24     Plant 2      Line3    mc5
Ashwini   Shift2(3-11)     1           Operator 2     2011-05-25     Plant 2      Line3    mc5

and so on..

I have a parameter table like temperature,pressure,ph,speed,co2 etc

Temperature table contains following data and this table will contains all the reading from 7am to till 3am

Temperature      Time              Date
27               13:13:54.000      2011-05-25
27.3             13:14:04.000      2011-05-25 
27.6             13:14:14.000      2011-05-25 
27.9             13:14:24.000      2011-05-25
28.2             13:14:34.000      2011-05-25 
28.5             13:14:44.000      2011-05-25 
27               16:13:29.000      2011-05-26 
27               16:13:31.000      2011-05-26 

and so on..

The user will select a line from dropdownlist and shift and he will select a date from th calender
If the user select shift2,line3 and date 25/05/2011 what are the readings are there between 3pm to 11pm should be displayed in my report

My report should look like:

Machine     Shiftname   Date               Time             Temperature
mc5         Shift2      25/05/2011         13:13:54.000     27
mc5         Shift2      25/05/2011         13:14:04.000     27.3
mc5         Shift2      25/05/2011         13:14:14.000     27.6

I’m also doing line-day report

where shiftname should change according to time for eg if time changes to 23:00:00 shiftname should change to shift3 in my report

if the user select particular shift and date for eg if the user selects shift1,line1 and date my report should contain all reading between 7am to 3pm

can any one help me on this.

  • 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-05-22T23:08:48+00:00Added an answer on May 22, 2026 at 11:08 pm

    You could get your report with following query

    SELECT d.Machine
           , CASE WHEN t.time BETWEEN '19:00:00.000' AND '23:59:59.999' THEN 'Shift1'
                  WHEN t.time BETWEEN '00:00:00.000' AND '02:59:59.999' THEN 'Shift1'
                  WHEN t.time BETWEEN '03:00:00.000' AND '10:59:59.999' THEN 'Shift2'
                  WHEN t.time BETWEEN '11:00:00.000' AND '18:59:59.999' THEN 'Shift3'
              END
           , t.Date
           , t.Time
           , t.Temperature
    FROM   Datalogging d
           INNER JOIN Temperature t ON t.Date = d.Date
    WHERE  d.Shifname = 'Shift2(3-11)'
           AND d.Line = 'Line3'
           AND t.Date = '25/05/2011'
    

    but if we can assume that each machine would have temperature readings each day, it is clear that there’s a relationship missing between your Temperature and Datalogging table.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

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.