ben,

i had to do this:
                                                                                
                                                        select 
SUM(CAST(getReportsForVehicle.ignitionOnTime
as INTEGER)) as ignitionOnTime
from getReportsForVehicle
where (ipAddressNum = #listGetAt(request.distinctIpAddressNumbers,o)#
and weekDay = 
'#listGetAt(listDeleteDuplicates(valueList(getReportsForVehicle.weekday)),d)#')

to get the sum to work.  even if it was spec. or not spec. as an
integer value... it didnt
matter, i was getting stupid errors just the same.

hth
tw



On 4/19/06, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:
> Ben,
>
> >I am having this really strange problem involving a query of queries that I
> >have never encountered before. Basically I am building a query with the
> >QueryNew() method:
> >
> > ... clip ...
> >
> >However, the following all cause error:
> >
> ><cfset REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ] =
> >ArrayLen( arrCriteria ) />
> ><cfset REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ] =
> >  Max( 5, REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ]
> >)
> >/>
> >
> >Heck, even this causes errors:
> >
> >REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ] =
> >  Max( REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ],
> >  REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ]
> >  ) />
> >
> >
> >Its like any function call that returns a number corrupts the SCORE value
> >for the QofQ.
>
> QoQ is a great idea, but it's buggy as heck. Everytime I've tried to use it,
> I've run into some kind of irregularity with it that I've had to spend time
> to work around.
>
> It sounds like you're running into casting issues. Even though CF is
> typeless, it still has some issues at times when it blends to Java that
> creates variables that should be typeless, but are not. I'm sure that's why
> it works fine when you don't declare the variable types, but errors when you
> explicitly declare the column types.
>
> Try using the JavaCast() function to explicitly declare your integer fields.
> I suspect that will get rid of the errors.
>
> -Dan
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238105
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to