Solved

do qrys return list or arrays?

Posted on 2002-04-18
3
146 Views
Last Modified: 2013-12-24
need to find max val for a colmn in db-  does qry return list or array?
<cfquery name="getIdOrigin" datasource="training">
select id_origin
from course_history_ext</cfquery>
<cfset newid = "ArrayMax(getidorigin.id_origin)">
0
Comment
Question by:owlsey
  • 2
3 Comments
 

Author Comment

by:owlsey
ID: 6951188
used this brute of an expression to do it- looks pretty sloppy to me...


<cfset newid = "#ArrayMax(ListToArray(ValueList(getIdOrigin.id_origin),','))#">
0
 
LVL 5

Accepted Solution

by:
Yog earned 5 total points
ID: 6951638
<cfquery name="getIdOrigin" datasource="training">
select id_origin, max(id_origin) as maxvalue
from course_history_ext</cfquery>

<cfoutput>
#training.maxvalue#
</cfoutput>
0
 

Author Comment

by:owlsey
ID: 6951878
works for me- didnt know about that sql function-

and i gather cf returns lists for qry's?

ja?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question