Hi all,
Didn’t think about val and inline!
Thanks for your help I use val:
concat(ATHLETE.club().ABBREVIATION, val(" "), ATHLETE.club().NAME))
> On 27 Oct 2024, at 17:23, Alf Lervåg <[email protected]> wrote:
>
> You should be using val or inline for value literals. I’d go for the latter
> in this situation.
>
> Alf Lervåg
>
>> 27. okt. 2024 kl. 16:31 skrev Simon Martinelli <[email protected]>:
>>
>> Hi,
>>
>> If I do this:
>>
>> concat(ATHLETE.club().ABBREVIATION, field(" "), ATHLETE.club().NAME)
>>
>> I get
>>
>> (("alias_128651403"."abbreviation" || cast( as varchar)) ||
>> "alias_128651403"."name")
>>
>> Which results in
>> org.springframework.jdbc.BadSqlGrammarException: jOOQ; bad SQL grammar
>> [select "public"."athlete"."id", "public"."athlete"."first_name",
>> "public"."athlete"."last_name", (("alias_128651403"."abbreviation" || cast(
>> as varchar)) || "alias_128651403"."name") from ("public"."athlete" left
>> outer join "public"."club" as "alias_128651403" on
>> "public"."athlete"."club_id" = "alias_128651403"."id") order by
>> "public"."athlete"."first_name", "public"."athlete"."last_name" offset ?
>> rows fetch next ? rows only]
>> at org.jooq_3.19.13.POSTGRES.debug(Unknown Source) ~[na:na]
>>
>> To make it work I have to use
>>
>> concat(ATHLETE.club().ABBREVIATION, field("' '"), ATHLETE.club().NAME)
>>
>> Why?
>>
>> Thanks, Simon
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected]
>> <mailto:[email protected]>.
>> To view this discussion visit
>> https://groups.google.com/d/msgid/jooq-user/5c8aa7ca-75cc-4230-a6b1-8fc526343dc4n%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jooq-user/5c8aa7ca-75cc-4230-a6b1-8fc526343dc4n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To view this discussion visit
> https://groups.google.com/d/msgid/jooq-user/1CBB45B3-25A1-4405-9021-56E34F9CB4A0%40lervag.net
>
> <https://groups.google.com/d/msgid/jooq-user/1CBB45B3-25A1-4405-9021-56E34F9CB4A0%40lervag.net?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/jooq-user/096B42FE-E6DF-4480-8B61-0D9FF276B8AD%40gmail.com.