Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
Placing Array of objects into mssql db from nodejs

I'm attempting to place a decently sized array of objects into a db and I've got the code written that will do it and several records ARE actually written to the DB, however something about the formatting is causing the function to throw errors.

One of those errors that I've seen on multiple attempts to fix this issue is:

"Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon."

another is

"Incorrect syntax near 's'."

When I initially open the array I'm attempting to place into the DB I get an alert from VSCode about symbols that needed to be removed but I am not able to get the error verbatim at the moment and don't know how to replicate the message. Regardless it has no effect on if it will add all entries or not.

My question is what about my objects could cause this kind of weird issue and what kinds of things could I fix keeping in mind that some of the records are actually being added. Thank you!

Also what is the best/easiest way for bulk adding items to a DB programmatically? ATM I'm just doing INSERT INTO query.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda