Look into the IN clause

ID IN (<cfqueryparam value="MyListOfIDs" cfsqltype="cf_sql_integer" 
list="yes">)

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
----- Original Message ----- 
From: "daniel kessler" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 29, 2004 11:02 AM
Subject: Re: invalid number?


>I figured out the problem. I had allowed the numbers to be entered with 
>commas, making them strings.  I changed all of them to items without commas 
>and they worked. ie 2,373 became 2373.  So I didn't see a "convertToNumber" 
>call.   Am I missing something in my headless rush through the day?
>
>>I had this working fine one morning and checked it on all computers.
>>I come in another morning and it's not working - I swear.  It's
>>giving me the error, "invalid number" and lists the WHERE in the
>>query as the line culprit.  I have the same query where I added the
>>line to there WHERE:
>>marathon_id = #cookie.vancouver_walk# AND
>>and this seems to work fine, but I don't want to specify an ID,
>>instead querying for everyone, so this query doesn't have it.
>>
>><cfset first_day = createDate(URL.yr,URL.mo,URL.day)>
>><cfset last_day = dateAdd("d",6,first_day)>
>><cfset the_num_days = 0>
>><cfset the_num_steps = 0>
>>
>>    <cfloop index="zz" from="1" to="#the_week#">
>>    <!-- return values for the week -->
>>   <CFQUERY NAME="get_gweek_totals" DATASOURCE="dpch">
>>        SELECT Sum(entry) AS num_steps,Count(entry) AS num_days
>>        FROM marathon_entries
>>        WHERE entry_type = 'vancouver_walk' AND
>>       entry_data_date >= #first_day# AND entry_data_date <= #last_day#
>>   </CFQuery>
>>   <cfset first_day = dateAdd("d",7,first_day)>
>>   <cfset last_day = dateAdd("d",6,first_day)>
>>   <cfset header="Week #zz#">
>><tr>
>>   <td>#header#</td>
>>   <td width="20%"
>>align="right">#NumberFormat(get_gweek_totals.num_steps,',')#</td>
>>   <cfset g_av_steps = 0>
>>   <cfif get_gweek_totals.num_days NEQ 0 >
>>     <cfset g_av_steps =
>>Int((get_gweek_totals.num_steps/get_gweek_totals.num_days))>
>>   </cfif>
>>   <td width="20%" align="right">#NumberFormat(g_av_steps,',')#</td>
>>   <cfif get_gweek_totals.num_steps EQ ""><cfset
>>get_gweek_totals.num_steps = 0></cfif>
>>   <td width="20%"
>>align="right">#NumberFormat((get_gweek_totals.num_steps *
>>2.25)/5280,'___._')#</td>
>></tr>
>>   <cfset the_num_days = the_num_days + get_gweek_totals.num_days>
>>   <cfif get_gweek_totals.num_steps EQ ""><cfset
>>get_gweek_totals.num_steps = 0></cfif>
>>   <cfset the_num_steps = the_num_steps + get_gweek_totals.num_steps>
>></cfloop>
>>-- 
>>Daniel Kessler
>>
>>Department of Public and Community Health
>>University of Maryland
>>Suite 2387 Valley Drive
>>College Park, MD  20742-2611
>>301-405-2545 Phone
>>www.phi.umd.edu
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185579
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

Reply via email to