Gossamer Forum
Home : General : Databases and SQL :

MONTH() - X compatibility

Quote Reply
MONTH() - X compatibility
I am using the MONTH() function in MySQL select statments. I am just wondering if anyone knows if this is compatible in other SQL Databases?

This particular example is used in Links SQL:

Code:


$DB->select ( { Action => 'Add' , 'MONTH(DateTracked)' => $thismonth} )


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] MONTH() - X compatibility In reply to
It seems to be a pretty standard SQL statement. What databases have you tried it with?

The following Google search turns up references to it in a number of databases:

http://groups.google.com/...&sa=N&tab=wg

- wil
Quote Reply
Re: [Wil] MONTH() - X compatibility In reply to
Hi Wil,

You know I have heard of Google - Groups, but I have had nothing to do with searching them yet. Thanks.

I guess the same goes for any of the MySQL date functions, YEAR(), MONTH(), DAY()... all of which I use. I cannot remember using them with MS SQL, but I will checkout the groups and see.

Thanks.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] MONTH() - X compatibility In reply to
From what I can see, they are all standard SQL statements and are supported by MS SQL, Postres and Oracle.

Cheers

- wil