Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

211
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda