Order By clause in the Shape command - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Order By clause in the Shape command

Last post 02-04-2008 07:56 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-04-2008 11:50 AM

    Order By clause in the Shape command

     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]";

    Filed under: , ,
  • 02-04-2008 07:56 PM In reply to

    Re: Order By clause in the Shape command

    Hi Steve,

     Here's the solution: 

     

    command += "{select * ";

    command += "from ";

    command += "[LaborSummary] as [LaborSummary] ";

    command += "where (LaborSummary.[CA1] = '" + ca1Prefix + "')} ";

    command += "append "; command += "({select * ";

    command += "from "; command += "[DistributedRecords] as [DistributedRecords] ";

    command += "order by DistributedRecords.[CA1], DistributedRecords.[BE], DistributedRecords.[DATE] ";

    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]  ";

     

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.