Difference between revisions of "VbzCart/queries/qryCtg src dups"
Jump to navigation
Jump to search
(extracted from catalog building page) |
m (2008-03-15) |
||
Line 3: | Line 3: | ||
* '''Requires''': {{vbzcart/query|qryCtg_src}} | * '''Requires''': {{vbzcart/query|qryCtg_src}} | ||
* '''Used by''': [[VbzCart catalog building|catalog building process]] (details to be documented) | * '''Used by''': [[VbzCart catalog building|catalog building process]] (details to be documented) | ||
+ | * '''History''': | ||
+ | ** '''2008-03-15''' Building sequence completely rewritten, so presumably this query was created then | ||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCtg_src_dups AS | <section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCtg_src_dups AS |
Latest revision as of 22:22, 3 May 2009
About
- Purpose: Returns all duplicate records (each IDS_Item must be unique) in the generated source data. This should be performed as a check on data integrity before writing to cat_items; any duplicates may indicate a problem (typically, entering items from a new catalog but forgetting to mark the old one as superceded), and should be inspected. (Not sure if conflicts will prevent the update from completing; to be determined later.)
- Requires:
- REDIRECT Template:l/vc/query
- Used by: catalog building process (details to be documented)
- History:
- 2008-03-15 Building sequence completely rewritten, so presumably this query was created then
SQL
<mysql>CREATE OR REPLACE VIEW qryCtg_src_dups AS SELECT
IDS_Item, COUNT(IDS_Item) AS cntRows
FROM qryCtg_src GROUP BY IDS_Item HAVING cntRows>1;</mysql>