Query with long line
RespondidaHi,
Is it possible to have a long query command in the Macro editor, split in several lines?
The idea is to split it in order to be more readable to the user in B1UP editor width.
Like:
@STORE1 = SQL(
SELECT TOP 1 b.WhsCode
FROM OIBT b
INNER JOIN OITW w on w.ItemCode = b.ItemCode and w.WhsCode = b.WhsCode
WHERE b.ItemCode = $[$38.1.0]
AND b.U_DyeLot = $[$38.U_DyeLot.0]
AND w.OnHand - w.IsCommited >= $[$38.11.NUMBER]
AND w.WhsCode NOT IN('QA','NC')
AND w.WhsCode IN(SELECT WhsCode from OWHS where BinActivat = 'Y')
ORDER BY w.OnHand - w.IsCommited DESC);
Tried several solutions (quotes, +, |, etc) but none works.
Of course, I can use a STORE variable to add query parts to it but its not a good solution...
Thanks!
Iniciar sesión para dejar un comentario.
Comentarios
0 comentarios