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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Comparing like with like?

Status
Not open for further replies.

tonyireland

Programmer
Feb 25, 2003
42
IE
I have been looking into an old Access application which has some bugs and I came across this piece of SQL. Can anyone tell me please what the purpose of the emboldened lines is? It seems to be comparing the same fields on the Pybf table. It was written in Access 95 I think.

SELECT Pybf.Pybf_Pygroup, Pybf.Pybf_Area, Pybf.Pybf_Empnum, Pybf.Pybf_Name, Pybf.Pybf_Addr1, Pybf.Pybf_Addr2, Pybf.Pybf_Addr3, Pybf.Pybf_Netpay, Pybf.Pybf_NewNet INTO Paygroups
FROM Pybf
WHERE (((Pybf.Pybf_Pygroup) Between [Forms]![Paygroup]![Start] And [Forms]![Paygroup]![Finish]) AND ((Pybf.Pybf_Area) Like [Pybf]![Pybf_Area]) AND ((Pybf.Pybf_Empnum) Like [Pybf]![Pybf_Empnum]) AND ((Pybf.Pybf_Name) Like [Pybf]![Pybf_Name]) AND ((Pybf.Pybf_Addr1) Like [Pybf]![Pybf_Addr1]) AND ((Pybf.Pybf_Addr2) Like [Pybf]![Pybf_Addr2]) AND ((Pybf.Pybf_Addr3) Like [Pybf]![Pybf_Addr3]) AND ((Pybf.Pybf_Netpay) Like [Pybf]![Pybf_Netpay]) AND ((Pybf.Pybf_NewNet) Like [Pybf]![Pybf_NewNet]))
ORDER BY Pybf.Pybf_Pygroup, Pybf.Pybf_Area, Pybf.Pybf_Empnum;
 
Is there a Pybf form as well as a Pybf table? If so, I'd guess that the Pyrbf form allows the user to enter some sort of search criteria???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top