0

An error occurred while preparing the query

SELECT SUBSTRING(UGB,1,9) as EntityCode, SUBSTRING(FUNCIONARIO/CREDOR DESCONTADO,1,9) as NRCId, SUBSTRING(FUNCIONARIO/CREDOR DESCONTADO,11,75) as CustName, VALOR as ReceiptAmount FROM [SubmissionDetails$]

for execution against OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".

to read these data from excel

1
  • 3
    when fields have special characters of spaces use [ ] [FUNCIONARIO/CREDOR DESCONTADO] Commented Jun 7, 2023 at 15:03

1 Answer 1

0

The FUNCIONARIO/CREDOR contains a special character(/), so I would suggest you use square brackets.

Sign up to request clarification or add additional context in comments.

2 Comments

An error occurred while preparing the query "SELECT SUBSTRING(UGB,1,9) as EntityCode, SUBSTRING([FUNCIONARIO_CREDOR DESCONTADO,1,9]) as NRCId, SUBSTRING([FUNCIONARIO_CREDOR DESCONTADO,11,100]) as CustName, VALOR as ReceiptAmount FROM [SubmissionDetails$]" for execution against OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)". STILL SHOWING SAME ERROR
@SugiJoshuva post the call stack from the error. and from inner exception if there is one. And not in comment, but edit your question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.