Solved

do qrys return list or arrays?

Posted on 2002-04-18
3
140 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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IIS 8.5 2 51
PHP in Apache server 20 89
Web server settings related to keepalive 1 110
cookies analysis tools 2 72
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now