> <cfquery name="qryName" datasource="MyDatasource">
>     SELECT UsersID, UsersTotalPrice
>     FROM TableName
>     WHERE UsersID = (#UsersID#)
>     ORDER BY UsersTotalPrice
> </cfquery>

Change the query to:

<cfquery name="qryName" datasource="MyDatasource">
    SELECT UsersID, UsersTotalPrice
    FROM TableName
    WHERE UsersID IN (#UsersID#)
    ORDER BY UsersTotalPrice
</cfquery>

Another developer had the same problem.  As long as the UsersID list is only
1 long, you have noerrors, if it gets longer, then you get errors.

============================================================
  Russel Madere, Jr.         Senior Web Developer
  ICQ: 5446158               http://www.TurboSquid.com

Some days you eat the bear; some days the bear eats you.
============================================================


> -----Original Message-----
> From: t nelson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 23, 2001 15:46
> To: CF-Talk
> Subject: Anyone else had this problem before?
>
>
> Hi All,
>
> I was just wondering if anyone out there had this problem before and what
> they did to correct it?
>
> Here's what I am trying to do:
>
> <cfquery name="qryName" datasource="MyDatasource">
>     SELECT UsersID, UsersTotalPrice
>     FROM TableName
>     WHERE UsersID = (#UsersID#)
>     ORDER BY UsersTotalPrice
> </cfquery>
>
> <cfoutput query="qryName">
> <tr>
>     <td>#UsersID#</td>
>     <td>#DollarFormat(UsersTotalPrice)#</td>
> </tr>
> </cfoutput>
>
> Here is the problem:
>
> when the data outputs it is sorting it by the first digit instead
> of giving
> me a true sort from highest to lowest cost. for example.
>
> $1,000.00
> $20,000.00*** (this record should be at the bottom but its not)
> $8,000.00
> $9,000.00
>
> I have rerun the query in both my query analyzer and in access.
> both times
> the query returns the correct results in the proper format.
>
> 1,000.00
> 8,000.00
> 9,000.00
> 20,000.00
>
> Has anyone out there had a similar experience with this or know
> of someway
> to correct this?
>
> Thanks in advance,
>
> Nelson
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to