Using MX6.1 with MySQL4 (InnoDB) on XP.

I have a table containing (among other things) a list of dates for soccer 
matches to be played. In order to list them correctly, the SQL has been:

SELECT DISTINCT fixturedate, 
        MONTH(fixturedate) AS CalMonth
FROM Fixtures
ORDER BY fixturedate

which works fine, and I'm able to output the result of the SQL into a 
table without problems, using CF's Dateformat() to create a mask for the 
output of the date.

So, MySQL can do this DateFormat stuff by itself, so let the database do 
the work:

SELECT DISTINCT fixturedate, 
        MONTH(fixturedate) AS CalMonth,
        DATE_FORMAT(fixturedate, '%d a%') AS testing
FROM Fixtures
ORDER BY fixturedate

But Coldfusion tells me that it "Can't convert a ByteArray object into a 
string" when it tries to output #testing# from the query (the other two 
fields are output with no error). However, outputting this query to a text 
file shows the #testing# field as a string.

If the 'DISTINCT' is removed:

SELECT fixturedate, 
        MONTH(fixturedate) AS CalMonth,
        DATE_FORMAT(fixturedate, '%d a%') AS testing
FROM Fixtures
ORDER BY fixturedate

Then the #testing# string outputs as is without a problem.

I can modify the output to use #ToString(testing)#, which produces the 
expected output for the second query above (and also still works with the 
other one), but cannot undertand why the DISTINCT clause should 
(apparently) change a string to a ByteArray....

There seem to have been a few reported instances on this (via Google), but 
no rational explanation (only the cure).

Any help would be appreciated.

Terry Riley


-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to