Hi,
During View creation, while Build and Synchronized has no error, when I try to run directly from SSMS, I get this error:
"Error converting data type nvarchar to bigint"
This view is consist of another 2 views which I just added 1 new field.
1. In the 1st View, I added new method that searching for Inventtrans. physical reserved qty like below:
public static server str PhysicalReserved()
{
DictView dictView = new DictView(tableNum(MyCurrentPhysicalFact));
str Qty = dictView.computedColumnString('InventTrans', 'Qty', FieldNameGenerationMode::FieldList);
str StatusIssue = dictView.computedColumnString('InventTrans', 'StatusIssue', FieldNameGenerationMode::FieldList);
return strFmt('CASE WHEN %1 = 4 THEN ABS(%2) ELSE 0 END', StatusIssue, Qty);
}
.Then add this Viewmethod to a new field : ViewComputedColumnReal
2. In the 2nd View actually there is no value, since the same method I only put '0' like below:
public static server str PhysicalReserved()
{
return strFmt('0');
}
Same as no1, added new field which is ViewComputedColumnReal.
If I run this two view independently, there is no error, but when run query of the top view which is the merge of this two, it will produce that error.
Anyone know what is the problem ? and how I can resolve this ?
Thanks