|
|
Subject: RE: Select current month and year - msg#00158
List: db.mysql.windows
Yes, I looked at that, but I only have one choice get the month OR year
Like this:
SELECT * from table WHERE Month(date_col) = Month(Date_add(NOW(), INTERVAL 1
MONTH);
The problem with this is it only returns the records that happened in this
month, and doesn't care about what year it is.
What I would like to do is be able to pull the current month AND the year.
Could I do it with a sub-select?
-----Original Message-----
From: Michael Ellis [ mailto:mellis@xxxxxxxxxxxxxxxxx]
Sent: Tuesday, April 29, 2003 9:12 AM
To: Todd Williamsen
Subject: Re: Select current month and year
Todd,
I think what you want is in the MySQL reference manual section 6.3.4 Date
and Time Functions.
Cheers,
Mike Ellis
----- Original Message -----
From: "Todd Williamsen" <todd@xxxxxxxxxxxxxx>
To: <win32@xxxxxxxxxxxxxxx>
Sent: Tuesday, April 29, 2003 10:07
Subject: Select current month and year
> I want to select the current month and year out of a datetime data column.
> How would I do that? This would be for a month to date report. I am also
> trying to figure out Daily report, weekly and year to date. I cannot
figure
> it out!
>
> Thanks
> Todd Williamsen
> Network Manager
> KTJ Consulting Company
> 847-356-5770
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@xxxxxxxxxxx
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
winmysqladmin
I'm having a problem with winmysqladim.exe
MySQL is stopped. It's a fresh install. When I start winmysqladmin,
the window pops up asking me for new username and password. I give it
one, then the main screen will show for a couple seconds. Then it
minimizes in the system tray, then disappears.
I really have no clue why this happens, MySql starts as a service, I'm
running Windows 2000 service pack 3.
I guess it's running fine and I have no problem learning to configure
things manually, I just wanted to know if anybody else
has this problem and can it be fixed?
Thanks!
David
Next Message by Date:
click to view message preview
RE: winmysqladmin
I see the stoplight icon, but then it disappears from the system tray.
I'm also using MySQL Control Center, and I can't connect to MySQL using
my password, I just use my user name and I connect fine, but then I
can't change anything, like add a user, etc.
It seems as if the best way to work with MySQL at this time is through
the command prompt using MySQL monitor, but even then I'm not prompted
for a password and don't know how to log in as admin.
I'm new to this and apologize in advance if there's something I've
missed in the installation.
David
-----Original Message-----
From: Pearson, Gregory [mailto:Gregory_Pearson@xxxxxxx]
Sent: Tuesday, April 29, 2003 9:25 AM
To: 'davidc@xxxxxxxxxx'
Subject: RE: winmysqladmin
David, I believe this is the default behaviour of the tool. Once it is
minimized, you should see a stop light icon in the system tray. When you
right-click on it you should see a menu. Somewhere in there is an option
to 'show'. Click on that and everything should be fine.
-----Original Message-----
From: David Chavarria [mailto:davidc@xxxxxxxxxx]
Sent: Tuesday, April 29, 2003 10:15 AM
To: win32@xxxxxxxxxxxxxxx
Subject: winmysqladmin
I'm having a problem with winmysqladim.exe
MySQL is stopped. It's a fresh install. When I start winmysqladmin,
the window pops up asking me for new username and password. I give it
one, then the main screen will show for a couple seconds. Then it
minimizes in the system tray, then disappears.
I really have no clue why this happens, MySql starts as a service, I'm
running Windows 2000 service pack 3. I guess it's running fine and I
have no problem learning to configure things manually, I just wanted to
know if anybody else has this problem and can it be fixed?
Thanks!
David
_______________________________
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and
confidential.
If the reader of the message is not the intended recipient or an
authorized representative of the intended recipient, you are hereby
notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, please
notify us immediately by e-mail and delete the message and any
attachments from your system.
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@xxxxxxxxxxx
Previous Message by Thread:
click to view message preview
Re: Select current month and year
SELECT EXTRACT(YEAR FROM mytable.mydatetimecolumn )
etc.
Ignatius
____________________________________________
----- Original Message -----
From: "Todd Williamsen" <todd@xxxxxxxxxxxxxx>
To: <win32@xxxxxxxxxxxxxxx>
Sent: Tuesday, April 29, 2003 4:07 PM
Subject: Select current month and year
> I want to select the current month and year out of a datetime data column.
> How would I do that? This would be for a month to date report. I am also
> trying to figure out Daily report, weekly and year to date. I cannot
figure
> it out!
>
> Thanks
> Todd Williamsen
> Network Manager
> KTJ Consulting Company
> 847-356-5770
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@xxxxxxxxxxx
Next Message by Thread:
click to view message preview
RE: Select current month and year
> SELECT * from table WHERE Month(date_col) =
> Month(Date_add(NOW(), INTERVAL 1 MONTH);
>
> The problem with this is it only returns the records that
> happened in this month, and doesn't care about what year it is.
>
> What I would like to do is be able to pull the current month
> AND the year. Could I do it with a sub-select?
Why not:
SELECT * from table WHERE Month(date_col) =
Month(Date_add(NOW(), INTERVAL 1 MONTH)
AND Year(date_col) = Year(NOW());
HTH,
John Hopkins
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@xxxxxxxxxxx
|
|