Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Web Mountaineer #1
ListGetAt in CFQUERY
I have a database of computer components that helps drive a custom system
builder. I have 1 price field that has a list of prices delimited with an
underscore so that there can be multiple prices for the same component. The
values can be a price, 0 or na like 45.00_na_0.00_83.00_na_75.00. I have been
using the ListGetAt function to access the appropriate price for outputs, if
statements and to create variables with no problem. My question is Can I use
ListGetAt as part of a SELECT statement or ORDER BY clause in CFQUERY. I have
tried some variations with no success. There is always a Sys_ID number passed
as part of the URL linking to this script so that choosing the appropriate item
in the list is easy enough. I want to access the appropriate item to use for
the ORDER BY clause. For example ... SELECT ListGetAt(Part_Wholesale,
url.Sys_ID, '_') AS Part_Price ORDER BY Part_Price OR ORDER BY
ListGetAt(Part_Wholesale, url.Sys_ID, '_') Thanks Larry
Web Mountaineer Guest
-
cfquery bug...still?
Hi, I have ColdFusion MX7,0,0,91690. I am trying to utilize the attached code. I am passing the query (it's easier for my implementation) in a... -
Problem with function ListGetAt
I have written the code for a DB driven image viewer. It is pretty simple. I am having a problem with my navagtion going to the previous and next... -
cfquery
I am trying to use debug in a query and it is a no go(should show at bottom of page). the query is working because I am getting recordcounts. Then... -
need help with cfquery
This should be an easy one ... unfortunately I am a n00b to sql and CF. I am trying to display a certain column in a table, the most recent one. I... -
CFQUERY with IF THEN ELSE
I have a CFQUERY which works perfectly and now I would like to add a little date calculation to this query to filter it little more. The query is a... -
zoeski80 #2
Re: ListGetAt in CFQUERY
Hi Larry
Looks like you're just missing the # marks around the ListGetAt function.
Zoe
SELECT #ListGetAt(Part_Wholesale, url.sys_id, "_")# AS Part_Price
FROM tableName
ORDER BY #ListGetAt(Part_Wholesale, url.sys_id, "_")#
zoeski80 Guest
-
The ScareCrow #3
Re: ListGetAt in CFQUERY
listgetat is a CF function and thus you can't use it as a db function
You can do this
Select *
From table
Where column = ListGetAt()
But you can't do what you want to do, this is because the cf can't determine
what's in the column untill it is returned from the query.
You need to either find some db functions (for the db your using) or apply the
listgetat function when outputting the recordset.
Ken
The ScareCrow Guest



Reply With Quote

