金融保險 » Rambler Channel 登入 註冊 推介網誌 行業分類 人氣榜 最新記事

SQL - DB2 - power

power(10,decimal(int(dcml_from) - int(dcml_to),13,5)) as dcml_derived

SQL - DB2 Temporary Tables - WITH Statement

 with
      temp1 as (select pub_name, max(c_price) as maxprice
                           from book group by pub_name),
      temp2 as (select  pub_name,  maxprice from temp1
                    where maxprice = (select max(maxprice) from temp1) )
      select case when t.maxprice = t2.maxprice  then '*' else '' END,
        k.pub_name, isbn, author, title, c_price
        from book k, temp1 t , temp2 t2
        where k.pub_name = t.pub_name and
              k.c_price = t.maxprice
        order by k.pub_name;

 source: http://www.cs.newpaltz.edu/~pletcha/DB/db2_TempTables.html

autoit

http://www.autoitscript.com/autoit3/index.shtml

 ; hot key for exit
HotKeySet("^!x", "MyExit")
;move mouse to click
$i = 1
While $i <= 361
    MouseClickDrag ( "left", 191, 652, 412, 408 )
    Sleep ( 1500)
    $i = $i + 1
WEnd
; Exit
Func MyExit()
    Exit
EndFunc

DB2 SQL Cookbooks

Hope you enjoy them.

http://mysite.verizon.net/Graeme_Birchall/id1.html

Don't miss out the great photos from here.

http://mysite.verizon.net/Graeme_Birchall/id10.html

SQL - Locating the first day of the month

select * from file
where indate >=
date(curdate() - day(curdate()) days + 1 day)