I am getting an error on the Order By clause. Does anyone know the correct syntax?
command += "{select * ";
command += "from ";
command += "[LaborSummary] as [LaborSummary] ";
command += "where (LaborSummary.[CA1] = '" + ca1Prefix + "')} ";
command += "append "; command += "({select * ";
command += "from "; command += "[DistributedRecords] as [DistributedRecords]}";
command += "relate [CA1] to [CA1]) as [DistributedRecords],";
command += "({select * ";
command += "from ";
command += "[LaborNonLaborComments] as [LaborNonLaborComments]} ";
command += "relate [CA1] to [CA1]) as [LaborNonLaborComments], ";
command += "({select * ";
command += "from ";
command += "[RisksOppsComments] as [RisksOppsComments]} ";
command += "relate [CA1] to [CA1]) as [RisksOppsComments] ";
command += "order by DistributedRecords.[CA1], DistributedRecords.[BE], DistributedRecords.[DATE]";