You have probably thought of all of these solutions, but I need to kill
an hour before I can put the top down on the Vette and drag my ass
home...

1. Convert to WDDX, do a regex replace
2. Insert into SQL database and query it back out
3. Build a new query object with the extra columns, then loop over this
query and copy the data to the new query object.

I haven't tried it, but does QoQ support Left() or Right() rather than
Mid() or SubString()? 

It seems with all the limitations of QoQ, it should have just been named
"QueryResorter".

Mike

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Roland Collins
Sent: Friday, March 18, 2005 2:18 PM
To: [email protected]
Subject: RE: [CFCDev] OT: QoQ Substring?

There's the rub - it comes from a call to cfdirectory.  I'm trying to
retrieve a list of files and then reorder them.  The file names
themselves contain a date, so the files are named "xxx_122004.pdf", etc.
What I want to do is run a substring to parse out the month and year and
then order by them.  So the final code would be something like:

<cfquery dbtype="query" name="qryFiles">
        SELECT *,
                SUBSTRING(name, 5, 2) AS month,
                SUBSTRING(name, 7, 4) AS year
        FROM qryFiles
        ORDER BY year DESC, month DESC
</cfquery>

Obviously that won't work in QoQ :(

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to