Roland, I think you have a quote in the wrong place: If A'||AvdNr||'.ICA_ARTIKEL@'||LookUpServerName|| 'BORTTAGS_FLAGG = 0 '' ||
Should probably read: If 'A'||AvdNr||'.ICA_ARTIKEL@'||LookUpServerName|| 'BORTTAGS_FLAGG = 0 ' || > Cheers, > > John Thomas -----Original Message----- Sent: 08 April 2002 13:43 To: Multiple recipients of list ORACLE-L Hallo, I have some trouble with this pl/sql procedure. I would like that this lvsql to be run only if the field Borttags_flagg = 0 but i get an error in the if statement, whatis wrong with this? It get the erromressage: LS-00103: Encountered the symbol "||AvdNr||" when expecting one of the following: . ( * @ % & = - + < / > at in mod not rem then <an exponent (**)> <> or != or ~= >= <= <> and or like betwe.. when I compile the whole procedure. Please help me with this. (If the borttags_flagg = 1 then it will continue the loop and check for next one. etc... If A'||AvdNr||'.ICA_ARTIKEL@'||LookUpServerName|| 'BORTTAGS_FLAGG = 0 '' || then (this lvsql is to be run only if field borttags_flagg = 0) lvSQL := 'SELECT ICA_ARTIKEL.FSGPRIS,ICA_ARTIKEL.BORTTAGS_FLAGG,ICA_ARTIKEL.PANTBELOPP ' || --PBK.LPKORGEANREL.EANREL,PBK.LPKORGEANREL.VARUTYP ' || 'FROM A'||AvdNr||'.ICA_ARTIKEL@'||LookUpServerName|| ' ' || --PBK.LPKORGEANREL ' || 'WHERE ICA_ARTIKEL.EAN=' || EanLPVara || ' ' || 'AND ICA_ARTIKEL.DATUM<TO_DATE('''||inDatum||''',''YYYY-MM-DD'') ' || -- 'AND ICA_ARTIKEL.BORTTAGS_FLAGG = 0 ' || 'ORDER BY DATUM DESC'; The whole procedure you can see in the file: (See attached file: testplsql.SQL) Thanks in advance Roland S ********************************************************************** Legal Disclaimer : This e-mail is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the sender by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail. The opinions expressed in this message are those of the sender and not those of TelesensKSCL. This footnote also confirms that this e-mail has been swept by MIMEsweeper for the presence of computer viruses. Please note that TelesensKSCL monitors both incoming and outgoing emails in accordance with our email policy. ********************************************************************** -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Thomas, John INET: [EMAIL PROTECTED] Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).