Re: SELECT DISTINCT For Month and Year?
Thank you for your help, I know all the books I looked at for MySQL are PHP. I suppose that is because ASP coders generally use SQL or Access. My problem is Access is limited and SQL costs too much so I am trying the MySQL thing.
This is the basic form of my code:
---------------
<%
DIM mySQL
mySQL = "SELECT DATE_FORMAT(DateEntered, '%M %Y') as mon_yr FROM Y4K GROUP BY mon_yr;"
DIM objRS
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
%>
<html>
<body>
<% Response.Write objRS("mon_yr")%>
</body>
<%
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</html>
---------------
I cannot seem to call other fields on my database, but I can call the calculated field "mom_yr".
But the only results I see on the page when executing is "??????4"
So I'm not sure what I'm doing wrong.
Thanks again!
- James
Subject
Written By
Posted
February 08, 2005 10:29AM
February 08, 2005 12:44PM
February 10, 2005 09:46AM
February 10, 2005 10:00AM
Re: SELECT DISTINCT For Month and Year?
February 11, 2005 10:15AM
February 11, 2005 11:20AM
February 11, 2005 11:33AM
February 15, 2005 10:33AM
February 15, 2005 12:34PM
February 16, 2005 11:32AM
February 16, 2005 05:00PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.