Difference between revisions of "VbzCart/queries/qryOrders Active"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(New page: ==Details== * '''Returns''': all orders which are currently active. For now, this just shows orders which haven't been pulled , but later it will look at the order state. As simple as it i...)
 
(alternate version)
 
Line 13: Line 13:
 
   (WhenClosed IS NULL);</mysql>
 
   (WhenClosed IS NULL);</mysql>
 
<section end=sql />
 
<section end=sql />
 +
==alternate version==
 +
* '''Purpose''': This version ignores the WhenClosed field, so we can check that no orders have been marked closed when they still have open items. Use temporarily for data remediation only, then restore to normal version.
 +
* '''History''':
 +
** '''2008-11-21''' Created because it looks like the Massive Order Closing closed ''all'' orders that were open.
 +
<mysql>CREATE OR REPLACE VIEW qryOrders_Active AS
 +
SELECT * FROM core_orders
 +
WHERE
 +
  (ID_Pull IS NULL);</mysql>

Latest revision as of 21:09, 3 December 2008

Details

  • Returns: all orders which are currently active. For now, this just shows orders which haven't been pulled , but later it will look at the order state. As simple as it is, it's still useful to have this as a separate query because:
    • Removing unneeded records before sending data helps to reduce bandwidth a little bit when called from a remote process
    • Serves as a reference which can be used unaltered even after the method of determining whether an order is "active" changes
  • Requires:
  1. REDIRECT Template:l/vc/table
  • History:
    • 2008-11-20 Added requirement that WhenClosed (new field) must also be NULL

SQL

<mysql>CREATE OR REPLACE VIEW qryOrders_Active AS SELECT * FROM core_orders WHERE

 (ID_Pull IS NULL) AND
 (WhenClosed IS NULL);</mysql>

alternate version

  • Purpose: This version ignores the WhenClosed field, so we can check that no orders have been marked closed when they still have open items. Use temporarily for data remediation only, then restore to normal version.
  • History:
    • 2008-11-21 Created because it looks like the Massive Order Closing closed all orders that were open.

<mysql>CREATE OR REPLACE VIEW qryOrders_Active AS SELECT * FROM core_orders WHERE

 (ID_Pull IS NULL);</mysql>