You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to get serial number by sales order line in SQL

edited Jul 5, 2024 1:20PM in Inventory Management 4 comments

Summary:

I need to get the serial result by order line, Does anyone know how to do it?

All I can do is the result below.

there are 2 lines with 2 different ship-out dates.

The serial number of line 3-1.

The SQL result I get:

Is it possible to return with:

shipped_QTY =1 , SERIAL NUMBER = 580508230196

shipped_QTY =4, SERIAL NUMBER = 102510240046/102510240058/102510240072/102510240099

The SQL part of SERIAL NUMBER:

Version (include the version you are using, if applicable):

24B

Code Snippet (add any code snippets that support your topic, if applicable):

(SELECT listagg(DISTINCT REPLACE(REPLACE(IUT.SERIAL_NUMBER,'-1',''),'_1',''),'/')

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!