?
Solved

Lotus NotesSQL Year function usage

Posted on 2014-03-07
4
Medium Priority
?
909 Views
Last Modified: 2014-03-07
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.
0
Comment
Question by:Alan Varga
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 400 total points
ID: 39913191
Probably the YEAR function isn't implemented. NotesSQL is only a very basic way to execute SQL-like queries on a Notes database. See also the documentation...

Ah, yes, that's your 2nd Frage: http://www.ibm.com/developerworks/lotus/documentation/notessql/
0
 
LVL 2

Author Comment

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

Vielen Dank!
0
 
LVL 2

Author Closing Comment

by:Alan Varga
ID: 39913698
The answer came back quickly and to the point, with a helpful link.  Thanks very much Experts Exchange!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39913740
Bitte sehr.  :-)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question