Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

SQL String Functions in X++ (RIGHT, LEFT)

$
0
0

Hi,

I am working on a RDP report that needs to give a count of the number of bottles by size. The size of the bottle is noted in the itemID field which has 010A, 010B, etc...where the last  letter (A/B) specifies the size. However, I can't seem to find a way to use the RIGHT function within X++ to pull just the last letter of that itemID field. I know there is a way to execute SQL directly from AX, but I'm not sure if this would be viable.

For example, I have: SELECT Count(itemID), Right(itemID, 1) From TableName....(in SQL)

So I'd get

Count            Size

10                    A

15                    B

5                      C

Eventually, I need to push the count qty into fields in my temp table, which has fields such as SizeA, SizeB, SizeC, all containing the corresponding quantities.

Any help would be excellent and much appreciated!

Thanks!


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>