I'm very sorry, I don't fully understand the issue you're experiencing yet.
When you write
even tried - DSLContext.select("select user from SAMPLE where user is
> null") is not working.
Did you try your query exactly like this? There is no "select(String)"
method on the DSLContext type. Perhaps you meant "DSLContext.fetch()"?
In any case, please provide us with all necessary steps to help you. What
I'm still missing to understand your issue is:
What (exact) jOOQ queries did you write? What did they return? What did you
expect them to return?
Best,
Lukas
2014-11-04 21:07 GMT+01:00 <[email protected]>:
> Please find sample H2 DB file attached.
> or can use
> 1. CREATE TABLE SAMPLE (USER VARCHAR (20))
> 2. then insert, '',NULL,'xyz' value.
>
> both empty and null conditions are not working for me via JOOQ API,
> however SQL formed by JOOQ does execute correctly on H2 Console and return
> results.
> even tried - DSLContext.select("select user from SAMPLE where user is
> null") is not working.
>
> Thanks
>
> On Tuesday, November 4, 2014 11:14:20 AM UTC-8, Lukas Eder wrote:
>>
>> Hello,
>>
>> Both field.length().eq(0) and field.eq("") would be correct
>> Can you provide some sample data to reproduce this issue?
>>
>> Also, in case you're using H2 in Oracle compatibility mode, there's a
>> chance that you're using Oracle behaviour, in case of which empty strings
>> and NULL would be the same thing. See:
>> http://www.h2database.com/javadoc/org/h2/engine/Mode.
>> html?highlight=oracle&search=oracle#treatemptystringsasnull
>>
>> Cheers,
>> Lukas
>>
>> 2014-11-04 19:51 GMT+01:00 <[email protected]>:
>>
>>> Hi,
>>>
>>> I have a table in H2 having column of tyI'm pe string with null as well
>>> as empty value.
>>>
>>> So like to know jooq condition to select empty values for a row.
>>>
>>> jooq --> field.isNull() check allows me to select null value
>>>
>>> however for empty value tried following, but its not working.
>>>
>>> field.length.eq(0) or field.eq("")
>>>
>>> Could you please provide any pointers, whats going wrong here?
>>>
>>> Thanks
>>>
>>>
>>> --
>>> 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].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>
--
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].
For more options, visit https://groups.google.com/d/optout.