User-939850651 posted
Hi jagit saini,
jagjit saini
I also want Date of A1.Ordno from table 2 where table 2 Ordno = A1.OrdNo
I don't understand what this means, where table 2 refers to the Test table in your query?
In addition, if you want to add the'S-' character in front of the field, you could try this:
select STUFF((Select Distinct + ',S-'+ A1.Ordno
from Test A1
where A1.No ={?No@}
FOR XML PATH('')),1,1,'') as SalesRef
If I misunderstood something, could you provide more details?
Best regards,
Xudong Peng