Hi, I'm trying to find out if it's possible to limit the output of a query
to one record. I have a database that is sorted in decending order and I
only want the top record (the one with the biggest total) to display. I can
do a work-a-round by setting a variable to "on" before the query output an
19, 2001 10:10 PM
To: CF-Talk
Subject: One record query output
Hi, I'm trying to find out if it's possible to limit the output of a query
to one record. I have a database that is sorted in decending order and I
only want the top record (the one with the biggest total) to display. I can
d
...display content
Or you could just do this:-)
...display content
-Original Message-
From: Michael Gribbin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 March 2001 2:10 PM
To: CF-Talk
Subject: One record query output
Hi, I'm trying to find out if it's p
Michael,
You can use the maxrows="1" in the cfquery statement.
example:
select field1,field2
from table
Dan
- Original Message -
From: "Michael Gribbin" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001
You can use the MAXROWS attribute on CFQUERY and/or on CFOUTPUT.
That should do it,
Lee.
-Original Message-
From: Michael Gribbin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 March 2001 14:10
To: CF-Talk
Subject: One record query output
Hi, I'm trying to find out if it'
]]
Sent: Monday, March 19, 2001 8:10 PM
To: CF-Talk
Subject: One record query output
Hi, I'm trying to find out if it's possible to limit the output of a query
to one record. I have a database that is sorted in decending order and I
only want the top record (the one with the biggest total)
Try max(column_value) or min(column_value) in where clause
- Original Message -
From: "Michael Gribbin" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 10:09 PM
Subject: One record query output
> Hi, I'm tryi
er [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 March 2001 15:18
To: CF-Talk
Subject: Re: One record query output
Michael,
You can use the maxrows="1" in the cfquery statement.
example:
select field1,field2
from table
Dan
- Original Message -
From: "Michael Gribbin&quo
ch 20, 2001 11:16 AM
Subject: RE: One record query output
> Can you use the maxrows attr within cfquery ?
>
> Chris
>
> Christopher Conrad
> Senior.Programmer.Analyst
> Advanced.Technology.Group
> The.Limited.Inc
> http://www.limited.com
> (o) 614.415.1181
> (c) 614.52
> Hi, I'm trying to find out if it's possible to limit the output of a query
> to one record. I have a database that is sorted in decending order and I
> only want the top record (the one with the biggest total) to
> display. I can do a work-a-round by setting a variable to "on" before the
> query
mmer.Analyst
> Advanced.Technology.Group
> The.Limited.Inc
> http://www.limited.com
> (o) 614.415.1181
> (c) 614.523.0532
> -Original Message-
> From: Michael Gribbin [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 19, 2001 10:10 PM
> To: CF-Talk
> Subject: One record query out
11 matches
Mail list logo