Updating the DECPLCUR (Decimal Place Currency) in Dynamics GP

First off... this is highly unsupported. You should not be doing this. Stop, go back. Don't do this. 

(sigh)

But sometimes clients ask me to update the decimal places on an item that they've had in production for some time. 

The code below works for making a decimal place longer. BUT NOT SMALLER. You'd have to add code to round all the decimal places if you're going smaller. 

 

select replace('update ' + dpl.table_name + ' set decplcur = 5 where itemnmbr in ("80-138","80-169") ',char(34),char(39))
    from INFORMATION_SCHEMA.COLUMNS dpl
        join (select table_name from INFORMATION_SCHEMA.columns where column_name = 'itemnmbr') itm on itm.table_name = dpl.table_name
        join INFORMATION_SCHEMA.tables tab on tab.table_name = dpl.table_name
    where dpl.COLUMN_NAME = 'decplcur'
        and tab.table_type = 'base table'
    order by dpl.table_name

 

 



RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences