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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:20:16+00:00 2026-06-17T08:20:16+00:00

I have a table (Rooms) which contains a number of rows. Each row represents

  • 0

I have a table (Rooms) which contains a number of rows. Each row represents a room and each room needs to exist twice (once for fall, once for spring semester). Sometimes when folks add a room they only add it for one semester. I’m working on a process that will synchronize the rooms between semesters.

First I’ve pulled two queries, one that gets all of the rooms with fall in their semester column and one that gets all of the rooms with spring in their semester column, like so:

        Dim getFallRooms = (From p In dbContext.Rooms _
                            Where p.semester = "Fall" _
                            Select p)
        Dim getSpringRooms = (From p In dbContext.Rooms _
                              Where p.semester = "Spring" _
                              Select p)

The results will each contain multiple rows with the following columns: id, building, room, occupant, and semester.

What I want to do is something like this (pseudo):

For Each row in getFallRooms
    If row.building and row.room not in getSpringRooms Then
       ' Code to add new row with fall as the semester.
    End If
Next

Any suggestions on how I can make this into actual, workable code?

  • 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-17T08:20:17+00:00Added an answer on June 17, 2026 at 8:20 am
    For Each row in getFallRooms
        If (From p in getSpringRooms 
            Where p.building = row.building 
            AndAlso p.room = row.room).Count = 0 Then
           ' Code to add new row with fall as the semester.
        End If
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table in which I am inserting rows for employee but next time
I have a table with a Ajax.BeginForm on each row. This works good to
I have one BIG table(90k rows, size cca 60mb) which holds info about free
I have a table which stores bookings of rooms, the schema is: ID |
i have two table Rooms, BookedRooms want to select BookedRooms.RoomID(which is more than one)
i have a table of data, which can have each other as parents or
I have a room class, which has 3 linked tables, Property , Sex (as
i have 3 Tables is my SQL Database: First Table: Room: ID <pk>, Roomname
I have table with around 70 000 rows. There is 6000 rows that i
For a booking system I have a table with rooms, arrival and departure. Example

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.