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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:50:30+00:00 2026-06-14T11:50:30+00:00

I have two tables in DB from which I want to select. In one

  • 0

I have two tables in DB from which I want to select. In one of them ‘Events’ I have events (Id, start, end, type) and in the other I have ‘Events_before_after’ where I collect events that are linked with some of the events from ‘Events’ – (Id, EventId, start, end, type).
I have also a list of ids of Events by which I need to order the events in select query.

This is what I have:

List<int> orderIds = ...

from order in orderIds
join event in events order on order equals event.id
select new DataEvent ()
{
    eventId = event.Id,
    start = event.start,
    end = event.end,
    type = event.type
}).Concat
from eventOther in Events_before_after
select new DataEvent ()
{
    eventId = eventOther.Id,
    start = eventOther.start,
    end = eventOther.end,
    type = eventOther.type
}

Is it possible to order also the second select? I mean – is there way to order it by eventId which links to ‘Events’?

What I need is:

event1
event2
eventBefore3
event3
eventAfter3

what I have is:

event1
event2
event3
eventBefore3
eventAfter3
  • 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-14T11:50:32+00:00Added an answer on June 14, 2026 at 11:50 am

    You can do this:

     //your query
     ...
    from eventOther in Events_before_after
    select new DataEvent ()
    {
        eventId = eventOther.Id,
        start = eventOther.start,
        end = eventOther.end,
        type = eventOther.type
    }
    into NewEvent
    order by NewEvent.eventId
    select NewEvent;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the query to select some columns from two tables, which must contain
I have two tables, one that has a foreign key from the other. I
I have two different tables from which I need to pull data blogs which
I have two tables with list of urls fetched from different sources. I want
I have two tables and their only difference is one column is missing from
I currently have two tables, one is products and the other is options (colour,
i want to do one thing on my mysql DB. I have two tables:
I have two tables which are data sources say A,B. I want to fetch
I have two tables. One is article and the other structure. And the articles
I have two tables, one for users, and one for renewals. I want to

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.