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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:57:46+00:00 2026-06-07T20:57:46+00:00

Im not sure if the title fully explains what I am after here so

  • 0

Im not sure if the title fully explains what I am after here so let me try explain in a little more detail…

I need to be able to create an table that displays this…

Dates Examples
Enlarge Image

Tables:

  1. Items (every time this item was installed and removed)
  2. Supplier (Every time the supplier was used with the item)
  3. Rate (rate for the supplier)

It needs to be able to:

  1. Get the ranges in the period selected
  2. Get the earliest date from the tables as the start date
  3. Get the latest date

If the start dates are all before the start period and all the end dates are after the end period then it will be a simple single line. But any dates that start or end in the middle of the period then set relevant dates for that line and get the next start date after previous line end.

I have done the entire program using Linq apart from this and I have something that looks like it works but Im really not happy with the way Iv done it.

My questions are… whats an elegant way of dealing with these dates? And should I be using C# or SQL Server for best result?

  • 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-07T20:57:49+00:00Added an answer on June 7, 2026 at 8:57 pm

    first glade to see someone working at energy management industry.

    Unfortunately, I don’t quite understand your question, however, my suggestion is:

    “Move the generate/retrieve data logic down a layer”

    The performance: SQL Server > .Net > LINQ

    The functionality of LINQ is very limited and not easy to deal with.

    Have you tried to use SQL Stored Procedure to bring back a set of data?

    Functions inside SQL Query like case statement and min group by can easily solve your problem.

    In this case, SQL Server will bring back intended data to C#, then C# just need a way to present these data.

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

Sidebar

Related Questions

The title might not explain my problem fully but I wasn't sure how to
Not sure the title fully describes the problem/question I'm trying to ask, sorry. One
The title may not seem very clear - was not sure how to explain
Sorry for the title not really sure how to explain it being that I
I'm not sure that title is worded very well, but not sure how else
I'm not sure that title conveys my meaning, please change it if you can
I am not sure my title is correct or not since I have no
I am not sure if the title is accurate. I have several classes like
First of all, I'm not sure if the title accurately describes what I'm referring
Not entirely sure my question title describes what I want to do, but couldn't

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.