I have the following code
while
select sum(any2Int(SLD_Bundles))
from _ProdTable
group by _SiseChart.SizeID
join SizeId,DropId
from _SizeChart
where _SizeChart.InventSizeId==_InventDim.InventSizeId
{
//Bundle = str2Int(_ProdTable.SLD_Bundles);
CBLTblSchdDataBundleTmp.SLD_BUNDLE=_ProdTable.SLD_Bundle;
CBLTblSchdDataBundleTmp.SIZEID=_SizeChart.SizeId;
CBLTblSchdDataBundleTmp.DROPID=_SizeChart.DropId;
CBLTblSchdDataBundleTmp.insert();
How do I convert string to Int. The field SLD_Bundle is an nvarchar in the table
If you have such a need, it sounds like a bug in the data model and the right solution is change the data model.
As far as I know, there is nothing in X++ select statements that would instruct SQL to do such a conversion. But you could create a view with such a computed column and sum this view instead of the table.
André Arnaud de Cal...
292,111
Super User 2025 Season 1
Martin Dráb
230,934
Most Valuable Professional
nmaenpaa
101,156