Marc,
I believe your problems is with the first select.  Specifically
in the sub-statement.  Syntax you use is improper for the
GROUP BY clause.  Your sub-select has 
 "GROUP BY custnum,tr_date,ch_code HAVING COUNT (*) > 1)"
but you select part has
 "(SELECT (CTXT(custnum)+CTXT(tr_date)+ch_code), COUNT(*)
FROM"

I belive for group by to work the select part must be:
"(SELECT custnum,tr_date, COUNT(*) from".  There must be
a one to one match with column names exclusive of COUNT(*)
in select with column name in the GROUP BY clause. 
-- 
Jim Bentley
American Celiac Society
[EMAIL PROTECTED] - email
(973) 776-3900 x5029 - voicemail/fax



---- marc <[EMAIL PROTECTED]> wrote:
> Hi all
> 
> I upgraded my office to 6.5++ last wk  and was
> having fun with all of the new features but I ran
> into a problem.
> 
> Several buttons, EEP's and command blocks will not
> run.  I can click on a button and it will not run.  Even
> after several clicks no luck then all of a sudden it will
> work.
> 
> Below is one example of a problem EEP, the code
> between the xxxxxxxxxxxxxxxx is what is in the
> APX file.  It seems Rbase is getting lost when jumping
> to the APX file and the return.
> 
> Any thoughts or things I should look for.  So far I have
> been able to work around each problem I have ran into
> but an not sure what the problem is.
> 
> thanks
> marc
> 
> 
>   RUN ckdupchr IN prog.apx                -- this is where
> Rbase trips up, the
>         code between xxxxxxxxxxxxxx's is what is in ckdupchr,
> it runs OK
>        with the code pasted in the EEP
> 
> xxxxxxxxxxxxxxxxxxxxxxxx
> 
> SELECT COUNT(custnum) INTO vzz FROM tran_daily +
>   WHERE tr_type = 1 AND (CTXT(custnum)+CTXT(tr_date)+ch_code)
> IN +
>   (SELECT (CTXT(custnum)+CTXT(tr_date)+ch_code), COUNT(*)
> FROM tran_daily +
>   GROUP BY custnum,tr_date,ch_code HAVING COUNT (*) > 1)
> 
> IF vzz > 0 THEN
>    PAUSE 2 USING  'Check the next screen for duplicate
> charges. +
>    You may have duplicate charges for a patient.  Highlight
> the +
>    duplicate charge and press F9 to Delete it.'=50 +
>    AT CENTER,CENTER
> 
> EDIT USING ed_tran +
>   WHERE tr_type = 1 AND (CTXT(custnum)+CTXT(tr_date)+ch_code)
> IN +
>   (SELECT (CTXT(custnum)+CTXT(tr_date)+ch_code), COUNT(*)
> FROM tran_daily +
>   GROUP BY custnum,tr_date,ch_code HAVING COUNT (*) > 1)
> +
>   ORDER BY custnum,tr_date,ch_code CAPTION +
>   '*** Are these charges duplicates? ***'
> 
> ENDIF
> 
> xxxxxxxxxxxxxxxxxxxxxxx
> 
> BROWSE t1.custnum=7 AS patnumber, t2.f_name=12 AS FIRST,
> t2.l_name=12 +
>   AS LAST,'Charges'=12 AS charges, SUM(t1.ch_price) AS
> amount +
>   FROM tran_daily t1,ptinfo t2 +
>   WHERE t1.custnum = t2.custnum AND t1.tr_type = 1 +
>   GROUP BY t1.custnum,t2.f_name,t2.l_name,t1.tr_type
> 
> 
> RETURN
> 
> 
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> 

__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l

Reply via email to