Forum

Forum breadcrumbs - You are here:ForumGeneral: Chit-chatTemplates - where used
Please or Register to create posts and topics.

Templates - where used

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?

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

David Walton has reacted to this post.
David Walton

Thanks Jerry, that does the job.

The WHERE NAME = format worked where I was sorting out templates with similar names.