Extend the code context in database queries [SQL] #904
Replies: 2 comments
-
Update:a (temporary) solution has been found using the substring function (variable, start, string length (pos1-pos0)+100) in the select part. If you have another solution, I'd be happy to read it. |
Beta Was this translation helpful? Give feedback.
-
Hi, In Reports > Coding Reports you can tick the Text Context box to perform this function. In Project > Settings you can set how many characters before and after.
You should add 1 as sqlite starts the string at the position of 1, and not 0 as python does. ( I added the 1 on separately just for understanding). |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm looking for a solution in order to extend the code context with the SQL. In other words, by code context I mean the sentences that precede and follow the coded text in the source text file.
So the key question in this topic is whether we can use the pos0 and pos1 attributes (or others attributes) to display the sentences before and after the coded text? It's not a question of displaying the whole source file, but just of increasing the number of characters (like 300 characters) to be displayed around the coded text.
I hope i'm clear.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions