Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

I am outputting a list of insert commands from MS SQL Server using SQLCMD to a flat file.

When I try and run this file in DBISQL (ASA 9) I am being told there is an illegal character '/n' on line 2.

I have tried all sorts of commands in SQLCMD, but I keep getting this error. Is there anything I can do to remove this character in DBISQL?

When the SQL file is viewed in Interactive SQL there are no problems with the file.

asked 22 Nov '17, 10:46

Jongee's gravatar image

accept rate: 0%

edited 22 Nov '17, 11:57

There is most likely a syntax error that is being poorly diagnosed; e.g., the SQL parser has run off the end of the SQL code before realizing there is something wrong.

The bottom line is, there is no invalid /n character... look for some other problem.

One technique is to delete chunks of text until the code works, then look at the most recently-deleted chunk to find the problem.

permanent link

answered 22 Nov '17, 11:07

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

Thanks, I will give this a go. Viewing the code in ISQL reports there are no issues.

(22 Nov '17, 11:27) Jongee

Did you add a semicolon at the end of each statement or put a 'go' on a new line between statements?

permanent link

answered 22 Nov '17, 11:16

John%20Smirnios's gravatar image

John Smirnios
accept rate: 37%

I have a semicolon at the end of each statement.

(22 Nov '17, 11:26) Jongee
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Nov '17, 10:46

question was seen: 1,773 times

last updated: 22 Nov '17, 11:58