Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

SQL Join statement not working in InfoPath

Avatar of zintech
zintech asked on
Microsoft SQL Server 2008InfoPath
8 Comments1 Solution641 ViewsLast Modified:
I am using InfoPath to query two different tables.  The SQL syntax itself is fine.  The SQL syntax is:

SELECT PurchOrd.PONbr,PurOrdDet.InvtID from PurchOrd JOIN PurOrdDet ON PurchOrd.PONbr=PurOrdDet.PONbr WHERE PurchOrd.PONbr LIKE '%" + PONbrId + "%' AND PurchOrd.ProjectID LIKE '%" + ProjectId + "%' AND VendName LIKE '%" + VendorNameId + "%' AND PurchOrd.ReqNbr LIKE '%" + PRNbrId + "%' AND PurchOrd.User6 LIKE '%" + ReqId + "%'

When I click the button, all of the fields that are in the PurchOrd table show textboxes, even if I did not select the field data to be shown.  The fields for the PurOrdDet table do not show up, even if I selected them to be shown.  Both tables are in the same datasource.  I have even tried using separate datasources and using a join statement in the SQL but it still does not work.
Avatar of Clay Fox
Clay FoxFlag of United States of America imageDirector of Business Integration

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers