-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It returns an "out of memory/resource" error;
> "Error Diagnostic Information Error occurred for unknown cause."
First of all... That error is most likely a sign of larger problems.
Perhaps problems w/ memory leaks & other such garbage similar to what
the folks in the "CF SP2 + Win2k/Memory Leaks" thread are seeing. I
wish you luck hammering those problems out...
Now for your query... Since you're running MS SQL, you have very
easy options:
<CFQUERY NAME="prize" DATASOURCE="SALES">
SELECT TOP 5 prize.value, draw.drawdate,
contest.contest_name, contest_type.contest_type,
state.state
FROM state, prize, draw, contest_type, contest, company
WHERE prize.draw_id = draw.draw_id
AND draw.contest_id = contest.contest_id
AND contest_type.contest_type_id = contest.contest_type_id
AND contest.company_id = company.company_id
AND company.state_id = state.state_id
ORDER BY prize.value DESC
</CFQUERY>
You may need to mess around w/ the fields you're bringing back to
make SQL happy, but the TOP keyword should make things quite a bit
easier... Check the MS SQL Books Online for more info on the TOP
keyword.
Best regards,
Zac Bedell
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
iQA/AwUBOivfn6vhLS1aWPxeEQI0YgCghCcJ/RS4eUfvx+lIt/OFsuGeeoIAn00m
FzYObcUQzfnsHi6/XPdm3rLJ
=L5EE
-----END PGP SIGNATURE-----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists