I pass in multiple drawing numbers and expect to get all the matching results back.
If I pass in drawing numbers that are 50 characters or less it all works as intended. As soon as I pass in a drawing number that is > 50 characters it fails.
with an unhelpful error message: "Severity: Error, Text: Bad SQL statement. Review the server event logs for details. "
Same BAQ but instead of a list I do D = DrawingNumber_C with a 100 character string it works fine.
I am trying to return all the records from PartRev that match any of the incoming parameter values for DrawingNumber. The default drawingNumber field for that table was way to short for us so we have a custom one that is x(100) DrawingNumber_C.
I am sending multiple DrawingNumbers at once because I am trying to get all the relevant records for a bill of material at once rather than having a linear # of calls per bom item which would add a lot more overhead.
I could always re create this BAQ that only takes one parameter D instead of a list and compare that way for any item that has a drawingNumber > 50 but performance will take a severe hit for that.
@josecgomez I am invoking the BAQ through the EpicorRESTAPICore BAQ method
but same result when invoking the BAQ in the BAQ Designer in Epicor as well.
@gpayne When I try the expression you sent it complains about the @D parameter not being scalar
Must declare the scalar variable “@D”.
Case when @D like Concat('%',PartRev.DrawingNumber_c,'%') then 1 Else 0 End
Did you create a new parameter @DrawList that was not a list type and just dumped all the drawing numbers in one value?