Ask a Question related to ASP Database, Design and Development.
-
Scott #1
Identify Last Record
I'm returning a SQL recordset that uses "With Rollup" to render totals as
the last record. Normally I simply loop through recordset and response.write
each record adding HTML tags. However, I'd like to make the last record bold
to show it's a total.
How can I determine that a particular record is the last one?
My usual syntax is
Do While Not objRS.EOF
... Loop through records
Scott Guest
-
Identify type of PDF
A PDF has been sent to me and I want to identify whether it is press-ready, print-ready, etc. I preflighted it and found low-res images and JPEGS, so... -
Can anyone identify this site please?
Hi all and apols for re-posting About a year ago I downloaded a bunch of funky flash sites - the link is to a part of an image from one that I... -
Can't identify font
I have a Logo that I made prior to my hard disk crashing. since I have replaced the hard drive and reinstalled AI, I don't seem to have the font... -
identify a font
I have to make changes to a page created by someone else. The page contains text that was converted to graphics. I need to make new graphics, but I... -
Identify Hackers?
"Joe Maloney" <jpmaloney@sutv.com> wrote in message news:%23tn2yhdPDHA.3664@tk2msftngp13.phx.gbl... using person firewall program, insight ... -
Aaron Bertrand [MVP] #2
Re: Identify Last Record
When you reach the rollup row, aren't there NULL values in columns to the
left of the sum?
For example, with the following query against the pubs database:
select discount, avg(discount) from discounts
group by discount with rollup
The last row has NULL for discount. If this doesn't help, can you show your
query?
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Scott" <sbailey@mileslumber.com> wrote in message
news:#in8JFFwDHA.2080@TK2MSFTNGP10.phx.gbl...response.write> I'm returning a SQL recordset that uses "With Rollup" to render totals as
> the last record. Normally I simply loop through recordset andbold> each record adding HTML tags. However, I'd like to make the last record> to show it's a total.
>
> How can I determine that a particular record is the last one?
>
> My usual syntax is
> Do While Not objRS.EOF
> ... Loop through records
>
>
Aaron Bertrand [MVP] Guest
-
Scott #3
Re: Identify Last Record
I have it rendering "Total" and just realized I can test for that word.
Thanks again.
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
news:eL9XApFwDHA.3220@tk2msftngp13.phx.gbl...your> When you reach the rollup row, aren't there NULL values in columns to the
> left of the sum?
>
> For example, with the following query against the pubs database:
>
> select discount, avg(discount) from discounts
> group by discount with rollup
>
> The last row has NULL for discount. If this doesn't help, can you showas> query?
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
>
>
> "Scott" <sbailey@mileslumber.com> wrote in message
> news:#in8JFFwDHA.2080@TK2MSFTNGP10.phx.gbl...> > I'm returning a SQL recordset that uses "With Rollup" to render totals> response.write> > the last record. Normally I simply loop through recordset and> bold> > each record adding HTML tags. However, I'd like to make the last record>> > to show it's a total.
> >
> > How can I determine that a particular record is the last one?
> >
> > My usual syntax is
> > Do While Not objRS.EOF
> > ... Loop through records
> >
> >
>
Scott Guest



Reply With Quote

