Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **** Copyright 2016, StorePorter LLC****
- * Module....: exportproductsandfamilies.scp
- * Created by: Patrick J. Murtaugh
- * Date......: 02/16/16
- * Client....: Sportsmans Finest
- * Desc......: Export all products and families
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Module....: exportproductsandfamilies.scp
- * Created by: Patrick J. Murtaugh
- * Date......: 02/16/16
- * Client....: Sportsmans Finest
- * Desc......: Export all products and families
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Created by: Patrick J. Murtaugh
- * Date......: 02/16/16
- * Client....: Sportsmans Finest
- * Desc......: Export all products and families
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Date......: 02/16/16
- * Client....: Sportsmans Finest
- * Desc......: Export all products and families
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Client....: Sportsmans Finest
- * Desc......: Export all products and families
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Desc......: Export all products and families
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Export Fields: active, sku, upc, name, category, price, family
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- * Changes...:
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExpo
- **** Copyright 2016, StorePorter LLC ****
- local lcExportFile as string
- lcExportFile = getfile('xls', 'Export', '', 0, 'Specify Products and Families List Export to XLS filename')
- if empty(lcExportFile)
- return .f.
- endif empty(lcExportFile)
- wait window nowait 'Querying Products and Families...'
- select active, ;
- sku, ;
- upc, ;
- product.name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .f. as Family ;
- from swwebstore!product ;
- join swwebstore!catlink ;
- on product.pk = catlink.fkparent ;
- join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- where catlink.parent = 'PRODUCT' ;
- and product.FKFamily = 0 ;
- union all ;
- select active, ;
- sku, ;
- upc, ;
- Family.name as name, ;
- category2.name as Category, ;
- basePrice as Price, ;
- .t. as Family ;
- from swwebstore!Family ;
- left join swwebstore!catlink ;
- on Family.pk = catlink.fkparent ;
- left join swwebstore!category2 ;
- on catlink.fkcategory = category2.pk ;
- into cursor prodExport
- wait window nowait 'Exporting...'
- select prodExport
- copy to(lcExportFile) type xl5
- use in prodExport
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement