Skip to Content
0
May 09, 2008 at 05:00 PM

Auto generate BP code

105 Views

I know this subject has been discussed in here several times and I have searched and tried several of theexamples. Can someone please tell me what is wrong with the following code as I receive error message internal error when I execute the FMS

SELECT CASE WHEN OCRD.CardType = 'S' THEN 'V' ELSE 'C' END + CAST((MAX(CAST(RIGHT(T0.CardCode, (LEN(T0.CardCode)-1)) AS INT))+1) AS VARCHAR) FROM OCRD T0

Thanks in advance for any help