cancel
Showing results for 
Search instead for 
Did you mean: 

Handling /n when using DBISQL

0 Kudos
2,124

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Breck_Carter
Participant

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.

0 Kudos

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

johnsmirnios
Advisor
Advisor
0 Kudos

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

0 Kudos

I have a semicolon at the end of each statement.