LATEST NEWS

SQL View Problem!

img
Jul
24

aku tau benda ni macam dah lama, tapi tak ramai yg tau pasai ni … Kalau guna SQL View dalam Microsoft SQL 2000 (tak cek lagi 2005), lepas je kite alter apa2 table, view yg kita buat tu xupdate diri sendiri secara automatik, dia akan completely fucked up…view ni dia point ke column number, bukan name, so bila kite add column, dia akan shift column number.

ni la yang duk jadi kat tempat production aku la ni… this sql culprit mmg menyebabkan big problem.. ampes tull. satu hari duk cari apa cause, rupa2nya this fucking sql views aaa…
solution dia simple je, cuma kita xaware je. Mmg kite leh view + efit view tu, semua column akan nampak updated, but bila run, semua salah.. error merata.

so cara senang, edit view tu, save balik pastu close..

but fuck this, i lost a lot of precious hours until i know bout this. 🙂 now I know, and knowing is half of the battle.

tensen2