Link to home
Start Free TrialLog in
Avatar of Alan Varga
Alan VargaFlag for United States of America

asked on

Lotus NotesSQL Year function usage

I am trying to use the YEAR function in a query going against a Lotus Notes database via ODBC.  Here is example 1:

SELECT StartTimeDate,
	StartDate,
	YEAR(StartDate)
FROM MainTopic
WHERE StartDate >= '2014-03-01'

Open in new window

The results are:
[Lotus][ODBC Lotus Notes]Name, constant, or expression expected

[Lotus][ODBC Lotus Notes]Incorrect syntax near ','

[Check aborted]


In example 2 I removed the line with the YEAR function:
SELECT StartTimeDate,
	StartDate
FROM MainTopic
WHERE StartDate >= '2014-03-01'

Open in new window


The result is:
[Command checked successfully]
so the query will run.


Also, is there any good documentation on using NotesSQL?  I haven't found any, but would be grateful for any hints.
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alan Varga

ASKER

That's what I was afraid of; my workaround is to use 'macro' as "StartYear" and handle it in Excel with VBA.

Vielen Dank!
The answer came back quickly and to the point, with a helpful link.  Thanks very much Experts Exchange!
Bitte sehr.  :-)