RE: newby question

"mohammed.kasri" <[email protected]> Wed, 9 Aug 2006 16:54:09 +0200
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <[email protected]>
Hi Connie,

Try this methode (with the table name):

       select max(sncordm .date_prepared) into h_last_ship
       from sncordm
       where sncordm .custnum = p_accust.cust_code


perhaps, you have globale variable with the same name.

Best regard.




Mohammed KASRI
Ingénieur d'Etudes et de Développement
[email protected]
Tel. D.   : 01.47.69.30.37
Tel Sdr. : 01.47.69.30.00
Fax        : 01.47.69.30.01

52 Rue Jean Jacques ROUSSEAU
92000 NANTERRE


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De la
part de Connie Cocanougher
Envoyé : mercredi 9 août 2006 15:12
À : [email protected]
Objet : Re: [fourjs-users] newby question

Yes, I'm attaching the entire function. When I comment out the two
select statements that select max(dates), it compiles.

>Hi Connie,
>
>Something in the code above this line does not appear to be correct,
>start looking above this SQL statement,  You do have a function named in
>your 4GL code right?
>
>Eg.
>
>Function do_something()
>   define h_last_ship date,
>          p_accust record like accust.*
>
>   select max(date_prepared) into h_last_ship
>   from sncordm
>   where custnum = p_accust.cust_code
>
>
>End function
>
>
>   _____
>
>
>Richard Turner
>
>Software Developer
>
>
>
>Phone: (613) 226-5511 ext. 2142 Fax: (613) 226-3377
>Email: [email protected]
>1 Antares Drive, Suite 400
>Ottawa, Ontario, Canada
>K2E 8C4
>
>This message is intended exclusively for the individual or entity to
>which it is addressed. This communication may contain information that
>is proprietary, privileged or confidential or otherwise legally exempt
>from disclosure. If you are not the named addressee, you are not
>authorized to read, print, retain, copy or disseminate this message or
>any part of it. If you have received this message in error, please
>notify the sender immediately by e-mail and delete all copies of the
>message.
>
>
>
>-----Original Message-----
>From: [email protected] [mailto:[email protected]] On
>Behalf Of Connie Cocanougher
>Sent: Monday, August 07, 2006 4:47 PM
>To: [email protected]
>Subject: [fourjs-users] newby question
>
>
>
>Any idea why I would get an error with this when trying to compile using
>BDS?
>
>    select max(date_prepared) into h_last_ship
>| A grammatical error has been found at 'select' expecting: $ FUNCTION
>REPORT.
>| See error number -6609.
>       from sncordm
>       where custnum = p_accust.cust_code
>
>
>  
>