This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select column_name,data_type | |
from information_schema.columns | |
where table_name = 'customerorderposition'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****** | |
Skript für Select neueste Bestellungen | |
Die Keys sind genauso für viele andere Tabellen verwendbar. | |
******/ | |
SELECT TOP (1000) B.kBestellung | |
,V.cName as 'Versandart' | |
,W.fWert/W.fFaktor as 'Betrag Bestellung in Euro' /* veraltete Wechselkurse */ | |
,P.cName as 'Plattform' | |
,B.nStorno | |
,B.dBezahlt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from enum import Enum | |
class AllReports(Enum): | |
"""Format: meaningful_name = (report, isutf8, date) .""" | |
# Listing Reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from luigipipe.mws import mws | |
def make_feed_row(feed_row_template, product, update_type): | |
return feed_row_template.format(product, '32.00') | |
def create_feed(): | |
feed_header = 'sku\tprice\n' | |
feed_row_template = '{}\t{}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# maybe its helpful or you see improvements | |
# i get lots of latin-1 encoded text fields, so i use this try block | |
def flatten_dict(d): | |
def items(): | |
for key, value in d.items(): | |
if isinstance(value, dict): | |
for subkey, subvalue in flatten_dict(value).items(): | |
try: | |
subvalue = subvalue.encode('latin-1').decode('utf-8') | |
except: |