When trying to create new SmartObject from a SQL Stored Procedure in K2 blackpearl 4.6.7 and 4.6.8 the following error message appears: [Stored_Procedure_Name] contains a Property with the same name 'Column_name'.
The Stored Procedure looks like a simple IF/ELSE statement that outputs either all or some columns:
This happens when a duplicate property is created. Then the property name does not get differentiated by implementing an incremental value. In other words IF and ELSE statements SELECT the same columns.
There is no fix for that, but currently the item is being worked on for 4.7.0. With that being said there are two workarounds. One being inserting the data into a table variable and querying the table variable:
Another one is inserting extra code underneath the AS keyword after variables are declared as shown below: