Search code examples
lotus-noteslotus-dominolotus

Lotus NotesSQL - "Joining" a child document to a parent when querying


I'm querying the back end of a customer complaint system build in domino using the NotesSQL driver.

My issue is I have a overall reference for the complaint (agent generated but unique) but there is also a "contact" table (table probably isn't the right word, I'm unfamiliar with Notes terminology) tracking customer calls etc against each complaint. This table does not have the reference contained it it, so I cannot join in a normal SQL fashion (I believe this is referred to as "application-linked". Is there anyway (e.g. using Notes implicit fields, etc.) to join these within the SQL query?

Essentially the result required is a record set of the complaint reference with the fields from "contact" against each.

Many thanks.


Solution

  • Notes is not relational. NotesSQL does not support JOIN operations. If there is a parent-child form relationship between your complaint and contact, then you can do a NotesSQL query against multiple forms with the WHERE clause using NoteUNID and NoteRefUNID as described here: link. That's the only type of implicit relationship that Notes maintains.