Hello Matthias, the answer here is relatively easy - you didn't hit any length limit.
There is no such thing like a string function called LEFT in SAP DB, neither in internal nor Oracle mode. Try a SUBSTR(value, 1, 128) for your usage, and check http://www.sapdb.org/7.4/htmhelp/48/0d801eb4f211d2a97100a0c9449261/content.htm for the functions supported with SAP DB. The error pos usually gives you a hint at which point in the statement the complaint was found - in your case it was position 63, which is around the first occurence of LEFT in your statement. Regards Alexander Schr�der SAP DB, SAP Labs Berlin > -----Original Message----- > From: Matthias Suttner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 17, 2003 6:14 PM > To: [EMAIL PROTECTED] > Subject: Re: how can i execute long SQL-Statements via DBMCLI > > > --- In [EMAIL PROTECTED], "Schildberg, Steffen" > <[EMAIL PROTECTED]> wrote: > > Hi Matthias, > > > > Matthias Suttner [mailto:[EMAIL PROTECTED] wrote: > > > > > > I'd like to execute SQL-Statements (INSERT, DELETE) once each > day. > > > > > > So far no problem for DBMCLI if the statement is short enough. > But I > > > have to execute a few that have approx. 1300 characters. > > > > > > When I execute these with DBMCLI's sql_execute it throws an error: > > > > > > ERR > > > -24988,ERR_SQL: sql error > > > -3008,Invalid keyword or missing delimiter > > > > > > > > > Is there any other solution to execute big SQL-Statements? I read > > > about DBPROC. Is this an option? > > > > > It surely is. But how about the Loader? Despite the name it is able > > to execute SQL statements, too. And it has a CLI (LoaderCLI), too ;- > ) > > Regards, > > Steffen > > -- > > Steffen Schildberg > > SAP DB Team > > SAP Labs Berlin > > _______________________________________________ > > sapdb.general mailing list > > [EMAIL PROTECTED] > > http://listserv.sap.com/mailman/listinfo/sapdb.general > > > Hi, > > I've tested REPMCLI and also a failure occurs. > > what's wrong on position: 63? The left statement? > > // * > // E -25010: SQL error -3008 = Invalid keyword or missing > delimiter (error position: 63) > > > *** schnipp *** > insert into "SAPUSER"."REPORT_FAMILY_PREVIEWS" > ( > select > left(REPORTVALUES.SVAL02, 128) as "CAMPAIGN", > left(REPORTVALUES.SVAL03, 128) as "FAMILY", > left(REPORTVALUES.SVAL05, 128) as "PREVIEW" > from > REPORTEVALUATIONS, > REPORTVALUES, > REPORT_PARAMETERS, > ( > select > left(REPORTVALUES.SVAL02, 128) as "CAMPAIGN", > left(REPORTVALUES.SVAL03, 128) as "FAMILY", > max > ( > right('00' & trim(REPORT_PARAMETERS.VALUE), 2) & > right('00' & trim(REPORTVALUES.LVAL04) , 2) & > right('00' & trim(REPORTVALUES.LVAL01) , 2) > ) as "MAX_ART_COLUMNS_COLORS" > from > REPORTEVALUATIONS, > REPORTVALUES, > REPORT_PARAMETERS > where > REPORTEVALUATIONS.EVALID = REPORTVALUES.EVALID > and > REPORTEVALUATIONS.EVALNAME = 'schaltung' and > REPORT_PARAMETERS.FORM = 'ART' and > REPORT_PARAMETERS.NAME = REPORTVALUES.WVAL04 > group by > left(REPORTVALUES.SVAL02, 128), > left(REPORTVALUES.SVAL03, 128) > ) x > where > REPORTEVALUATIONS.EVALID = > REPORTVALUES.EVALID and > REPORTEVALUATIONS.EVALNAME > = 'schaltung' and > REPORT_PARAMETERS.FORM > = 'ART' and > REPORT_PARAMETERS.VALUE = substr > (x."MAX_ART_COLUMNS_COLORS", 1, 2) and > REPORTVALUES.WVAL04 = > REPORT_PARAMETERS.NAME and > left(REPORTVALUES.SVAL02, 128) = > x."CAMPAIGN" and > left(REPORTVALUES.SVAL03, 128) = > x."FAMILY" and > REPORTVALUES.LVAL04 = num(substr > (x."MAX_ART_COLUMNS_COLORS", 3, 2)) and > REPORTVALUES.LVAL01 = num(substr > (x."MAX_ART_COLUMNS_COLORS", 5, 2)) > group by > left(REPORTVALUES.SVAL02, 128), > left(REPORTVALUES.SVAL03, 128), > left(REPORTVALUES.SVAL05, 128) > ) > > *** schnapp *** > > > > > > _______________________________________________ > sapdb.general mailing list > [EMAIL PROTECTED] > http://listserv.sap.com/mailman/listinfo/sapdb.general > _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
