SQL Error

SQL Error

am 06.09.2007 17:01:56 von Doug Anderson

Using FM9 under OS X.

I'm executing the following SQL statement for an ODBC import and I get
an error that displays what appears to be a Japanese or Chinese
character.

select CAcctNo, round(Sum(M2MAmt),2) from Pricing
where PostDate = '09/05/2007'
group by CAcctNo

Does FM not handle aggregate SQL functions? This statement works
perfectly when I run it in my SQL editor, SQL Grinder.

Re: SQL Error

am 06.09.2007 17:52:49 von VoicesInMyHead

On Sep 6, 8:01 am, Doug Anderson wrote:
> Using FM9 under OS X.
>
> I'm executing the following SQL statement for an ODBC import and I get
> an error that displays what appears to be a Japanese or Chinese
> character.
>
> select CAcctNo, round(Sum(M2MAmt),2) from Pricing
> where PostDate = '09/05/2007'
> group by CAcctNo
>
> Does FM not handle aggregate SQL functions? This statement works
> perfectly when I run it in my SQL editor, SQL Grinder.

Just guessing here (I'm kinda newish to SQL), but maybe it needs a
column name for the sum:

select CAcctNo, round(Sum(M2MAmt),2) as M2MAmt
from Pricing
where PostDate = '09/05/2007'
group by CAcctNo

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 32 & 64Bit / FMP Adv 9.0v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The only reason some people get lost in thought
is because it's unfamiliar territory for them.

Re: SQL Error

am 10.09.2007 23:04:29 von Doug Anderson

On 2007-09-06 10:52:49 -0500, VoicesInMyHead said:

> On Sep 6, 8:01 am, Doug Anderson wrote:
>> Using FM9 under OS X.
>>
>> I'm executing the following SQL statement for an ODBC import and I get
>> an error that displays what appears to be a Japanese or Chinese
>> character.
>>
>> select CAcctNo, round(Sum(M2MAmt),2) from Pricing
>> where PostDate = '09/05/2007'
>> group by CAcctNo
>>
>> Does FM not handle aggregate SQL functions? This statement works
>> perfectly when I run it in my SQL editor, SQL Grinder.
>
> Just guessing here (I'm kinda newish to SQL), but maybe it needs a
> column name for the sum:
>
> select CAcctNo, round(Sum(M2MAmt),2) as M2MAmt
> from Pricing
> where PostDate = '09/05/2007'
> group by CAcctNo
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Reality is the leading cause of stress...
> ...amongst those in touch with it.
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> WinXP Pro 32 & 64Bit / FMP Adv 9.0v1
> VoicesInMyHead
> a.k.a. The Voices
> No, we're not... Yes, we are...
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> The only reason some people get lost in thought
> is because it's unfamiliar territory for them.

M2MAmt is the column name in Sum(M2MAmt).