Solved

Lotus NotesSQL Year function usage

Posted on 2014-03-07
4
856 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:VieleFragen
  • 2
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 100 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 1

Author Comment

by:VieleFragen
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 1

Author Closing Comment

by:VieleFragen
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

919 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now