Templates - where used
Quote from David Walton on 2021-07-06, 3:53 amRM8 with SQLite ExpertPersonal and Windows10
To date I have used a filter based on TemplateID from the SourceTemplateTable to find relevant Source Names in the SourceTable. This has been improved to use a query for one off searches i.e.
SELECT Name FROM SourceTable WHERE TemplateID IN (SELECT TemplateID FROM SourceTemplateTable WHERE Name = "a.n.other Name")
My SQlite knowledge is basic! Can the above be improved e.g. to find Sources using a template with a Name that contains/begins with the user's choice of some text? Is it possible to have a query for Templates that performs in a similar manner to Tom Holden's SourceList.sql?
RM8 with SQLite ExpertPersonal and Windows10
To date I have used a filter based on TemplateID from the SourceTemplateTable to find relevant Source Names in the SourceTable. This has been improved to use a query for one off searches i.e.
SELECT Name FROM SourceTable WHERE TemplateID IN (SELECT TemplateID FROM SourceTemplateTable WHERE Name = "a.n.other Name")
My SQlite knowledge is basic! Can the above be improved e.g. to find Sources using a template with a Name that contains/begins with the user's choice of some text? Is it possible to have a query for Templates that performs in a similar manner to Tom Holden's SourceList.sql?
Quote from thejerrybryan on 2021-07-06, 6:26 pmUse WHERE NAME LIKE with wildcards. For example, WHERE NAME LIKE('birth%')
I always seem to run into problems with things like WHERE NAME =
I probably don't understand the SQL rules for = quite right with character strings, or maybe there is a problem with RMNOCASE comparisons. But the LIKE model always seems to work for me. If you are looking for 'string' with LIKE, you can do things such as LIKE ('%string') or LIKE ('string%') or LIKE ('%string%') where % is the wildcard designator.
Jerry
Use WHERE NAME LIKE with wildcards. For example, WHERE NAME LIKE('birth%')
I always seem to run into problems with things like WHERE NAME =
I probably don't understand the SQL rules for = quite right with character strings, or maybe there is a problem with RMNOCASE comparisons. But the LIKE model always seems to work for me. If you are looking for 'string' with LIKE, you can do things such as LIKE ('%string') or LIKE ('string%') or LIKE ('%string%') where % is the wildcard designator.
Jerry
Quote from David Walton on 2021-07-07, 4:45 amThanks Jerry, that does the job.
The WHERE NAME = format worked where I was sorting out templates with similar names.
Thanks Jerry, that does the job.
The WHERE NAME = format worked where I was sorting out templates with similar names.