Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
JavaScript function to display records from SQL Server based on input date values

I am trying to create a rentals website. There is provision to input the start date and enddate and I have to fetch records from SQL Server matching the criteria. There is a table called Bookings which stores start date and end date of Apartment bookings. In order to display Apartment records with no corresponding booking in the given time range, how can I proceed with the JavaScript function?

I have something like this right now. The select query seems to be missing something.

function searchDB() {
    var start = document.getElementById("start").value;
    var end = document.getElementById("end").value;
    Select * from Apartments where Id NOT IN (SELECT ApartmentId from Bookings where start >= StartDate  and end <= EndDate);
  }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need have a REST API which will connect to the SQL SERVER database fetches the data, The REST API end point should be invoked from Frontend javascript code using AJAX or Fetch API.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!