Tuesday 28 June 2016

Remove or Supress optional empty elements from target schema in Biztalk map (STRING Data Type)

Dear All,

I have a situation where in my target schema there are some optional elements whose data types are string. That elements can have value or may not have value. It means that element min occcur=0 and max occur = 1.

It will look like Name Element below snap in Source Schema:

Or  We may get empty single space under that element in source Schema like below Snap:


Solution:

By Using two functoids we can achieve this target:

1. Greater Than Functoid under Logical Functoids

2.Value mapping Functoid Under Advance Functoid.

The map will look like like below Snap:


Here in this map Name is having null value so what we did we took Greater than Functoid and that have two input parameters. In first parameter linked Name element to it and in Second parameter given one empty Space like below Snap:


and then in value mapping functoid linked first input as greater than functoid and second input parameter as Name element like below snap:



Thanks.










Get max length of data for a column in Oracle


There is a situation where a column of varchar type max length is 50. what my requirement is to know the max and min length of the data stored in that column.

Here are the queries:

Max Length of data:

Select max(length(your_col_name)) as max_length From your_table_name;

Min Length of data:

Select min(length(your_col_name)) as max_length From your_table_name;