RE: Q of Q crazy problem

2006-04-19 Thread Ben Nadel
Tony,

Work is a bit hectic at the moment, so haven't had time to play around with
the casting. Right now, I just removed the QueryNew() DATA TYPES and that
seems to work for the moment. I will see what I can experiment with tonight.

...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Tony [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 3:19 PM
To: CF-Talk
Subject: Re: Q of Q crazy problem

ben, did you get that working?
tw

On 4/19/06, Ben Nadel <[EMAIL PROTECTED]> wrote:
> Thanks,
>
> I will give that a try... Overall, though, I think QofQ are great and 
> very useful.
>
> -b
> ...
> Ben Nadel
> www.bennadel.com
>
> -Original Message-
> From: Tony [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 19, 2006 11:23 AM
> To: CF-Talk
> Subject: Re: Q of Q crazy problem
>
> 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.weekda
> y)),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:
> > >
> > > > >REQUEST.SearchQuery.CurrentRow ] = ArrayLen( arrCriteria ) /> 
> > > > >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:238188
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Q of Q crazy problem

2006-04-19 Thread Tony
ben, did you get that working?
tw

On 4/19/06, Ben Nadel <[EMAIL PROTECTED]> wrote:
> Thanks,
>
> I will give that a try... Overall, though, I think QofQ are great and very
> useful.
>
> -b
> ...
> Ben Nadel
> www.bennadel.com
>
> -Original Message-
> From: Tony [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 19, 2006 11:23 AM
> To: CF-Talk
> Subject: Re: Q of Q crazy problem
>
> 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:
> > >
> > > > >] = ArrayLen( arrCriteria ) />  > >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:238186
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Q of Q crazy problem

2006-04-19 Thread Ben Nadel
Thanks,

I will give that a try... Overall, though, I think QofQ are great and very
useful.

-b
...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Tony [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 19, 2006 11:23 AM
To: CF-Talk
Subject: Re: Q of Q crazy problem

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:
> >
> > >] = ArrayLen( arrCriteria ) />  >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:238114
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Q of Q crazy problem

2006-04-19 Thread Tony
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:
> >
> > >ArrayLen( arrCriteria ) />
> > >  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


RE: Q of Q crazy problem

2006-04-19 Thread Dan G. Switzer, II
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:
>
>ArrayLen( arrCriteria ) />
>  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:238098
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


RE: Q of Q crazy problem

2006-04-19 Thread Munson, Jacob
> NOW, EVEN MORE CRAZY, if I take out the data types in the 
> QueryNew() method,
> so that it is just:
> 
>"title, date, preview, link, score",
>   ) />
> 
> , the whole thing works like a charm. CRAZY!

Someone else might notice something, but it looks like it might be a
bug.  But since CF is supposed to be a typeless language, and you've
found it works if you don't specify types in your initial query, that's
probably your best bet.  If this data ever ends up heading to a DB, you
can do a cfqueryparam at that point to make sure all is kosher.


[INFO] -- Access Manager:
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law.  If you are not the 
intended recipient, you are hereby notified that any disclosure, copying, 
distribution, or use of the information contained herein (including any 
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in 
error, please immediately contact the sender and destroy the material in its 
entirety, whether in electronic or hard copy format.  Thank you.   A2



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238092
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54