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

new to MAS90, help with query

Status
Not open for further replies.

gswartz

Programmer
May 4, 2006
3
US
I have to write an export procedure to grab data from MAS90 and push it over to our sql server. I have the odbc driver installed and working with .net. The accounting girl sent me the crystal report query that she uses to generate the report, but when I run it in my program, I get back no data. So, then I ran a very simple query like

Select * from APB_CheckHistory

and I got back plenty of data. Here is the query that she sent to me. Does anyone see a problem with it?

SELECT APB_CheckHistory.VendorNumber, APB_CheckHistory.CheckNumber, APB_CheckHistory.CheckDate, APB_CheckHistory.CheckAmount, AP1_VendorMaster.Division FROM APB_CheckHistory APB_CheckHistory, AP1_VendorMaster AP1_VendorMaster WHERE ((APB_CheckHistory.Division=AP1_VendorMaster.Division) AND (APB_CheckHistory.VendorNumber=AP1_VendorMaster.VendorNumber)) AND (APB_CheckHistory.CheckDate>={d '2006-04-23'} AND APB_CheckHistory.CheckDate<={d '2006-04-28'}) AND AP1_VendorMaster.Division='01' ORDER BY APB_CheckHistory.CheckNumber
 
on the 3rd line it looks like you didn't put the "(" in front of APB_CheckHistory.CheckDate<={d '2006-04-28'})
 
Nevermind, I figured out what the problem was. The accounting girl gave me the wrong company to connect to. When I changed to the correct company, I got all the data. Thanks.
 
I can only assume she would love this monicker:
"accounting girl "

This is why Artemis slew Orion ERP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top