Archive for Januar, 2008

windows commandline minimized in scheduler/geplante tasks

Sonntag, Januar 27th, 2008

Starting a commandline job minimized in the windows scheduler:

Create a link (.lnk) for the .bat.file. In the properties of the .lnk-file select minimized.

In the scheduler/geplante tasks paste the name of the .lnk file. Do NOT select the file with the „browse …“ button. In the latter case the scheduler will start the destination of the .lnk-file, not the .lnk-file itself!

When you want no window at all then select as user: NT AUTHORITY\SYSTEM

delete from MySQL with outer join

Montag, Januar 21st, 2008

Here is the code to delete records from a MySQL table with an outer join.

e.g. to delete the records from a products_to_categories table that have no product in the products table:

delete from pc
using products_to_categories as pc
left outer join products p on pc.products_id =p.products_id
where isnull(p.products_id)