Hoelker, Juergen wrote: > > Hi, > > sorry, newbee alert :) > Ok, but is there a quick way to keep the funktionality of the "SELECT > FIRST/NEXT/..." Statement only with SELECT? I've got plenty of them and > don't want to surround everyone with more code... >
A 'quick' way is to substitute SELECT FIRST a, b INTO :p1, :p2 FROM tab SELECT NEXT a, b INTO :p1, :p2 FROM tab KEY k1 = :p3, k2 = :p4 to SELECT a,b FROM tab ORDER BY k1, k2 FETCH FIRST INTO :p3, :p4 FETCH NEXT INTO :p3, :p4 Assuming that you do not want to select NEXT randomly. Elke SAP Labs Berlin > Greets, > > **J�rgen** > > > > -----Urspr�ngliche Nachricht----- > Von: Zabach, Elke [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 17. Juni 2004 16:44 > An: Hoelker, Juergen; '[EMAIL PROTECTED]' > Betreff: AW: SELECT FIRST > > > Hoelker, Juergen wrote: > > > > Hi, > > > > Ich bin bei der Portierung von Adabas nach SAPDB 7.4 und hab probleme > > mit SELECT FIRST-Anweisungen, z.B. bei > > > > SELECT FIRST Afonr, Afo, Wverknr, Mschnam, Bemerk1 INTO :P_1 :IND, > > :P_2 :IND, :P_3 :IND, :P_4 :IND, :P_5 :IND FROM WZV_AFOS KEY Tverknr = > > :P_6,WHERE Tindex = > > :P_7 > > > > > > bekomme ich folgenden Fehler: > > > > SQLCODE: -3014 Invalid end of SQL statement > > SQLERRD(INDEX_6) : 125 ERROR NEAR ^ : WZV_AFOS ^KEY Tverkn > > > > Laut der Doku sollte es aber so gehen, was mache ich falsch?? > > > > You are doing several things incorrect: > > 1. you use the german language in an english-speaking mailing list 2. you > are using the 7.3 documentation and uses 7.4 > > If you would check 7.4 documentation, you will not find SELECT FIRST any > more. Therefore first is (syntactically) used as columnname, afonr as > referencename, the rest looks like a normal select into up to the word KEY > where normal select..into expect a WHERE-clause. --> correct errormsg. > > Please change your statement to normal (standard) SQL and get rid of the > old > fashioned, ADABAS-history with select first/last/next/prev. > > Elke > SAP Labs Berlin > > > Greets, > > > > **J�rgen** > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
