Forum

Please or Register to create posts and topics.

Add to all Children a Parent event shared with parents

Hi, I am a bit of a newbie to SQL. I am having a problem of missing sentence when running the Query to Add Parents Events to RM Database. I have created the Parents fact in RM, added a sentence template in the Principal and Parent roles.  See attached Parent-Fact.png

Parents-Fact.png

I ran the SQL against the database and the Parents fact is added to the children who have birth dates. The fact is then shared to the two parents but the share fact has no sentence template in the edit person view.

Missing-Sentence.png

Windows 10, SQLite Expert personal, latest version of RM.

Uploaded files:
  • Parents-Fact.png
  • Missing-Sentence.png

Hi,

I had the same sentence issue (and am a newbie as well) when adding a death fact to anyone not living with no fact. I used another query to get this and after a few tries, I got the default death sentence using ,CAST('' AS BLOB) AS Sentence. I have no idea what this is or it works but it does. Below my query:

INSERT INTO EventTable
SELECT NULL AS EventID
,2 AS EventType
,0 AS OwnerType
,PersonID AS OwnerID
,0 AS FamilyID
,0 AS PlaceID
,0 AS SiteID
,'.' AS DATE
,9223372036854775807 AS SortDate
,0 AS IsPrimary
,0 AS IsPrivate
,0 AS Proof
,0 AS STATUS
,0 AS EditDate
,CAST('' AS BLOB) AS Sentence
,CAST('' AS BLOB) AS Details
,'' AS Note
FROM PersonTable
WHERE PersonID IN (
-- Person without Dead Fact
SELECT distinct PersonID AS PersonID FROM PersonTable WHERE Living = 0
except select OwnerID as PersonID from EventTable where EventType=2
);

 

Chris's issue was covered here.

A BLOB is a data type meaning binary data, rather than numeric or text. CAST() converts between types. The EventTable definition sets the Sentence and Details columns to a type. SQLite is pretty flexible when it comes to data typing but, if you got an error message using just

'' AS Sentence

then it must have set them to BLOB type. I'd check the CREATE definition to be sure. If the EventTable.Sentence field is empty, RM uses the corresponding FactTypeTable.Sentence value.

Tom

Kamolga has reacted to this post.
Kamolga