Error 102

Severity

15

Message text

Incorrect syntax near '%.*s'.

Explanation

This error occurs when Adaptive Server detects a syntax error in a Transact-SQL® command or query. This error can occur when:

Action

Check the spelling and syntax of the command specified in the error message. If it is wrong, correct it in your Transact-SQL statement and run it again.

You can invoke an editor such as vi from isql to edit a SQL statement or statements. However, for the statements to execute, you have to enter the command termination string (usually “go”) after you return to isql. If you include the command termination string in the editor, then save the file and return to isql, the statement will not execute. If you enter the command termination string again after returning to isql, you receive the following error (vi is the editor in this example; you may be using a different editor):

1> vi
1> select * from sysmessages where error = 102
2> go
3> go
Msg 102, Level 15, State 1:
Server 'REL1002_NAME', Line 2:
Incorrect syntax near 'go'.

If you are not sure whether a query contains a reserved word, use this query to see a complete list of reserved words:

1> select name from spt_values where type = "W"
2> go

Additional information

Refer to the most current version of the Utility Guide, Transact-SQL User’s Guide, or the Adaptive Server Enterprise reference manuals for correct syntax.

Versions in which this error is raised

All versions