Thank you, thank you, thank you. I thought I was going nuts.
Alex
>Do you have a different SET ENGINEBEHAVIOR setting in the exe?
>By the way, for compatibility reasons, I strongly advice you NOT to set it to 70, you better change your select statement to work with a setting of 80 in order to comly with ANSI SQL.
>
>>Hi,
>>
>>I am having a problem with the following statement when running form an exe, but not when runing the project in development. The message is "GROUP BY clause invalid or missing".
>>
>>
>>SELECT S.*, ;
>> SUM(IIF(ExtAmt # 0 AND InvAmt # 0,ROUND(ShippedQty/IIF(SellFrac=0,1,SellFrac),2),000000.00)) AS CajasVenta, ;
>> SUM(IIF(ExtAmt = 0 AND InvAmt # 0,ROUND(ShippedQty/IIF(SellFrac=0,1,SellFrac),2),000000.00)) AS CajasPromocion, ;
>> SUM(IIF(ExtAmt = 0 AND InvAmt = 0,ROUND(ShippedQty/IIF(SellFrac=0,1,SellFrac),2),000000.00)) AS CajasMuestra ;
>> FROM CustomerHistSummary_ConRenglonesCajas_TrandateRange S ;
>> WHERE &tcWhere ;
>> GROUP BY 2 ;
>> INTO CURSOR (tcAlias)
>>
>>
>>Any ideas? TIA,
>>
>>Alex