Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort By Calculated field

Status
Not open for further replies.

psperry2

Programmer
Nov 7, 2007
141
US
My SQL statement Does not sort by Name. Is there another way to do this?

PARAMETERS prmEnd DateTime, prmStart DateTime;
INSERT INTO ztrptPendingScheduled ( ISInvID, Name, ContractID, Contract, StepID, StepName, StepDateStart, StepDateEnd, StepStatus )
SELECT tblPersons_steps.ISInvID, [InvLName] & ", " & [InvFname] AS Name, tblPersons.ContractID, TrefContract.Contract, tblPersons_Steps.StepID, trefSteps.StepName, tblPersons_Steps.StepDateStart, tblPersons_Steps.StepDateEnd, tblPersons_Steps.StepStatus
FROM trefSteps INNER JOIN ((trefContract INNER JOIN tblPersons ON trefContract.ContractID = tblPersons.ContractID) INNER JOIN tblPersons_Steps ON tblPersons.InvID = tblPersons_Steps.ISInvID) ON trefSteps.StepID = tblPersons_Steps.StepID
ORDER BY 2;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top