IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: jtcarm
About
User Name: jtcarm
Forum Rank: Newbie
Real Name:
Location Texas
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Wednesday, November 18, 2009
Last Visit: Friday, November 20, 2009 7:53:13 PM
Number of Posts: 2
[0.01% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Excluding empth string from DB
Posted: Wednesday, November 18, 2009 3:35:59 PM
OK, answered my own question:

Insert:
empty string constant
normalize-space function
equal function
filter

connect:
db column to normalize string
normalize result and constant to equal
equal result to filter bool
db column to filter node
filter on-false to schema element

suspect I will need a UDF for this as there will be lots of empty strings to strip.

YMMV
Topic: Excluding empth string from DB
Posted: Wednesday, November 18, 2009 3:15:01 PM
Hi,

I've used XML SPY awhile and just discovered Mapforce in Altnova mission kit and am loving it, awesome tool for mapping from DB to schema. The only problem I'm having is figuring out some of the conditional mappings and transformations.

I have a varchar field which some genius decided to populate with an empty string on inserts instead of leaving it null. The schema element this maps to is optional. So if the value is spaces, I want to treat it like null and not include the output element rather than create the element with an empty string value. What's the best/easiest way to do this?

Thanks!

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.