Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

JDBC Querying Null Values

Avatar

Former Community Member
I'm using the JDBC Query Multiple Rows as XML to query an Oracle database. Many of the fields I'm querying are nullable and in fact some contain null values. I can't figure out why the JDBC component queries a null value as the string "null". I've tried to work with nvl() or replace() in my SQL statement, but I haven't got either of them to work.



I would assume someone else has run into this. Anyone have any advice on how to get around this?
2 Replies

Avatar

Former Community Member
I'm also having an issue with this, I'm using MS SQL though. I tried defining the minOccurs in my XSD for the form that I'm merging the data with but that doesn't seem to work either. There has to be some way to fix this issue.

Avatar

Former Community Member
I just found a solution that worked for my situation.



On the form being merged with the xml data, select the field(s) you want to hide the null value for.

Then go into the 'Field' tab in the 'Object' palette, click on the patterns button.

In the Data tab click 'Allow empty' and in the text box below it type

null



This should hide any null values from being displayed as 'null' on the form. This also works for numeric fields and date/time fields.