
OUTPUT SQL "SELECT L_CableType.CableType, O_CableO.CableLabel, IIF(O_CableO.Owner=1, '', L_Owners.Owner) As Owner \\\
	FROM ((O_TubeCables INNER JOIN O_CableO ON O_TubeCables.CableO = O_CableO.ID) LEFT JOIN L_CableType ON O_CableO.CableType = L_CableType.ID) LEFT JOIN L_Owners ON O_CableO.Owner=L_Owners.ID \\\
	WHERE O_TubeCables.Tube=" + STR(TRUEVALUE(MSLINK)) \\\
  ( "%s%s\n", IIF(!EMPTY(CableType), RTrim(CableType) + ' ', '' ), IIF(!(EMPTY(CableLabel) AND  EMPTY(Owner)), '[' + LTrim(RTrim(RTrim(CableLabel) + ' ' + RTrim(Owner))) + ']', '') )
