U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Select a month in SQL
Re: Select a month in SQL [message #29330 is a reply to message #29311] Fri, 15 October 2010 14:37 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 15 October 2010 04:01

Hello all

A very simple question. How do you do to select all the registers of a month?

For example, this expression to select all people born in November, is not permitted:

SQL & ::Select(SqlAll()).From(TABLE)
			.Where(Month(BIRTHDATE) == 11);



Well, maybe it should have been permitted. But as this is rarely needed, nobody contributed the Month function yet.

Implementation will wildly vary based on database used, I am afraid.

Anyway, since then, you will have to look it up in your SQL reference and put into your U++ sql expression using generic SqlFunc. Then post it here so that we can start adding it to sqlexp (we in fact do NOT need all variants immediately).


 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sqlite: Missing GetTransactionLevel() Method - Implemented
Next Topic: Missing ASSERT?
Goto Forum:
  


Current Time: Sun May 24 16:38:52 GMT+2 2026

Total time taken to generate the page: 0.00439 seconds