Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

JDBC Querying Null Values

Avatar

Avatar
Validate 1
Level 4
Ryan_Lunka
Level 4

Likes

11 likes

Total Posts

143 posts

Correct Reply

11 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 4
Ryan_Lunka
Level 4

Likes

11 likes

Total Posts

143 posts

Correct Reply

11 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Ryan_Lunka
Level 4

12-03-2009

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?

Replies

Avatar

17-03-2009

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

17-03-2009

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.