Reputation: 335
I am trying to execute db2 command in unix command prompt db2 -tvsf UC_Repair_History.sql
it is giving me below error. I checked in the file only insert statements are there.I have executed the similar file those are execute this one is not executed. ERROR is given below
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "END-OF-STATEMENT" was found following "�".
Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
Please any one help
Upvotes: 1
Views: 8663
Reputation: 191
When performing a copy&paste e.g. from Word typographic quotes might get used which the DB2 CLI does not understand. Depending on the font it might be hard to spot the difference. In the following the first select statement was copied from Word, in the second statement I retyped the quotation marks:
db2 => SELECT COUNT(*) FROM SYSCAT.TABLES WHERE TABSCHEMA='SAPSR3'
SQL0104N An unexpected token "'SAPSR3'" was found following "RE
TABSCHEMA=’S". Expected tokens may include: "END-OF-STATEMENT".
SQLSTATE=42601
db2 => SELECT COUNT(*) FROM SYSCAT.TABLES WHERE TABSCHEMA='SAPSR3'
1
-----------
0
1 record(s) selected.
Upvotes: 3