Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

Levy Export

lev_code id,
pro_catalogue catalogue,
pro_desc description,
pri_vat tax_id,
pri_trade2 trade_value,
COALESCE(NULLIF(pri_per, 0), 1) trade_per,
CASE WHEN lev_disabled = 'Y' THEN 1 WHEN pri_to < NOW() THEN 1 ELSE 0 END is_disabled ,
CASE WHEN lev_modified > pro_modified AND lev_modified > pri_modified THEN lev_modified WHEN pro_modified > lev_modified AND pro_modified > pri_modified THEN pro_modified ELSE pri_modified END updated_at,
pro_code product_id,
pro_stockcode stock_code,
pro_supplier supplier_id
INNER JOIN product ON lev_product = pro_code
INNER JOIN price ON pri_product = pro_code
pri_from <= NOW()
AND NOT EXISTS(SELECT * FROM price p WHERE p.pri_seq <> price.pri_seq AND p.pri_product = price.pri_product AND p.pri_from > price.pri_from)
AND pri_trade2 > 0;
OUTPUT TO 'd:\\levies.csv'

Forcing an SVN export to overwrite a directory

You can run --force to make an SVN export overwrite a folder rather than write into it

cd /usr/local/etc/
svn export --force --username --password apassword

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed