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!

How to gets only the posted invoices from the database?

Status
Not open for further replies.

mlbechard

Programmer
Jun 22, 2009
87
CA
If I want to extract from an SQL query only the posted invoices, what should I put in the WHERE clause? Would it be only in oehdrhst_sql table or also in oeordhdr_sql table?

There is a field called Status in the oeordhdr_sql table. What the possible value are and what it means?

Thanks

ML
 
Posted invoices are only in the orhdrhst_sql and oelinhst_sql tables. Once it is posted is dissapears entirely from the oeordhdr_sql and oeordlin_sql tables, UNLESS there is a backorder. In that case they are in all 4 tables.

What are you trying to accomplish? Why are you worried about the status field?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
I have to create an SQL query to get all the posted invoices to Macola to feed the database in Salesforce. From that query the Salesforce team will create what they need to in their side.

I have noticed in the past that an order was in all 4 tables and I did not realized it was because there was backorder. So I thought that it may be better to look for a special status instead of taking all the orders in the history tables. But i guess not...
 
In the OEINQORD_SQL table, there is a ord_fg field. This is either O-Open, H-history or B-both, which I hope answers your qestions.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top