Book a Demo

Author Topic: String function in custom query  (Read 2720 times)

andmerk

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
String function in custom query
« on: May 01, 2019, 10:44:54 pm »
Hello,

I need help with this simple custom query which is used in a document fragment.

SELECT
[t_attribute.Name] AS [SpalteName],
t_attribute.Type AS SpalteTyp,
iif([t_attribute.AllowDuplicates]=1, 'X', '') AS SpalteNotNull,
iif(instr(1, [t_attribute.notes], "Quelle:") > 0 ,
left([t_attribute.notes], instr(1, [t_attribute.notes], "Quelle:") -1),  t_attribute.Notes) AS [SpalteKommentar-Formatted],
iif(instr(1, [t_attribute.notes], "Quelle:") > 0 ,
mid([t_attribute.notes], instr(1, [t_attribute.notes], "Quelle:") + 8, 1000), "")
AS [SpalteQuelle-Formatted]
FROM t_attribute
WHERE t_attribute.object_id =#OBJECTID#

We need to split the notes in two pieces if the string "Quelle" exists
and the query works fine as long as the content of notes is not longer than 255 characters.

Is there any possibility to use string functions in a query without changing  the string format from memo to text type and because of that is being cut off after 255 chararcters ?

Andrea

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: String function in custom query
« Reply #1 on: May 02, 2019, 08:58:19 am »
Anything like this is going to be highly dbms specific. I imagine you'll get more help on an MS Access board somewhere.