SAP Knowledge Base Article - Preview

2716155 - Error 102 and 156: Incorrect syntax near... - SAP ASE 16.0

Symptom

  • After upgrade from ASE 15.5 ESD #5.1 to ASE 16.0 SP03 PL05 HF1, received Error 102 on INSERT and DELETE statements:

Msg 102, Level 15, State 181:
Server 'ASE160', Procedure 'dbo.myproc', Line 312:
Incorrect syntax near 'mytable'.

  • This is the SQL causing syntax errors in the stored procedure:

DELETE mytable
WHERE mydata = Null

INSERT mytable
SELECT mydata = convert(char(30),col1)
+ convert(char(25),col2)
+ convert(char(25),col3)
+ convert(char(15),col4)
+ convert(char(1),col5)
+ convert(char(15),col6)
+ convert(char(8),col7)
+ convert(char(1),col8)
+ convert(char(4),segment_1)
+ convert(char(8),segment_4)
+ convert(char(8),segment_5)
+ convert(char(6),segment_6)
+ convert(char(4),segment_7)
+ convert(char(4),segment_2)
+ convert(char(3),segment_3)
+ convert(char(17),col9)
+ convert(char(60),col10)
FROM #mytemp
WHERE col7 <> "-0000000000000.00" OR col7 <> "+0000000000000.00"
ORDER BY segment_1,
segment_2,
segment_3,
segment_4

  • After the INTO clause was added to SELECT and the FROM clause to DELETE, received Error 156:

Msg 156, Level 15, State 2:
Server 'ASE160', Procedure 'dbo.myproc', Line 312:
Incorrect syntax near the keyword 'from'.

  • The stored procedure is executed by a Power Builder 12.5 application connected to the ASE 16.0 server.

Read more...

Environment

SAP Adaptive Server Enterprise (ASE) 16.0 SP03 PL05 HF1

Product

SAP Adaptive Server Enterprise 16.0

Keywords

drop, recreate, spaces, excessive , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.