2.25.2013

How to dock/undock system tree in Powerbuilder 12.5

This thing is also work in Powerbuilder 10.

To quickly dock or undock System Tree Window, press Ctrl and then click or drag system tree window.




3.01.2012

Oracle Notes & Tips

To Check Datafile size
  • SELECT * FROM DBA_DATA_FILES;
To Check Database User/Owner
  • SELECT * FROM DBA_USERS;
To change user's default Tablespace
  • ALTER USER <USER> DEFAULT TABLESPACE <TABLESPACE_NAME>


9.05.2011

Job Opportunity in Malaysia

My friend sms me they are looking for programmers with minimum 3 years experiences in .Net Technology and Ms SQL. Anybody who is interested please email your CV to lokesh@rm-applications.com.

4.20.2010

How to identify tables used in stored procedures

Untuk database MS SQL atau Sybase, jika anda ingin mengetahui nama stored procedures yang merujuk kepada tables tertentu anda boleh menggunakan arahan SQL dibawah ini :

Contohnya jika anda inginkan senarai stored procedures yang merujuk kepada table account_master; skripnya adalah seperti berikut :

SELECT distinct s.id, s.name
FROM sysobjects s, syscomments o
WHERE s.type = 'P'
AND s.id = o.id
AND lower(o.text) LIKE lower('%account_master%')

Skrip yang sama juga boleh digunakan untuk mencari hubungan antara stored procedures (stored procedures reference/link).

12.03.2009

Sybase Invitation - PowerBuilder 12 Preview Event

I got email from Sybase recently regarding PowerBuilder 12 Preview Event. Those who interested in Powerbuilder 12 Preview can come attend the event as stated below.

-------- email from Sybase -----------------------

Sybase invites you to "get ahead of the game" at their PowerBuilder 12 Preview Event.

Date: 15 December 2009
Venue: Crowne Plaza Mutiara Kuala Lumpur
Time: 9.30am - 12.30pm
RSVP: Pkoo@sybase.com


During this event you will get to see the Features and Capabilities of PB 12 and a complete test drive. With the release of PowerBuilder 12 scheduled for 2010 production, Sybase will be entering the complete world of .NET with their premier development tool. This release is completely housed within the .Net Isolated Development Shell. The new PB 12.Net is based on the WPF (Windows Presentation Foundation) features of the .Net framework that utilizes the new XAML language.

Presenting in this event is Mr Dave Fish - a Senior Sybase Technical Director with extensive experience on development tools, particularly the PowerBuilder family of products.

Agenda

9:30 am - 10:15 am - PowerBuilder Overview and Roadmap
10:15 am - 10:45 am - How to Web Enable PowerBuilder Applications
10:45 am - 11:00 am - Break
11:00 am - 12:00 pm - A Closer Look at PowerBuilder 12 and WPF Application Development

Sybase Powerbuilder 11.x for Microsoft .NET applications & PowerBuilder 12 Preview

PowerBuilder’s core strengths are lauded by analysts and customers. Why? Because it’s proven technology that gets the job done and meets your challenges. You can deploy your applications to the Web, Mobile, JEE, and .NET. You can support XP and Vista. You get native RDBMS support. You can develop Rich Internet Applications. You can do all this with the unmatched productivity PowerBuilder is known for. You don’t have to rewrite the wheel. You can modernize your code and applications with PowerBuilder 11.5.

11.16.2009

Fungsi Dateadd di dalam Oracle

Bagi mereka yang biasa dengan Sybase dan MS SQL mungkin sedikit 'ralat' kerana ketiadaan fungsi dateadd yang biasa digunakan untuk data jenis datetime/date. Ini kerana Database Oracle menggunakan kaedah + atau - dalam operasi data jenis date, kecuali fungsi add_months yang disediakan untuk operasi + - bagi bulan.

Untuk mengatasi masalah ini apa yang perlu dibuat ialah membuat satu user function yang berfungsi seperti dateadd di dalam Sybase ataupun MS SQL. Di sini saya sertakan contoh script yang boleh digunakan.

CREATE OR REPLACE FUNCTION f_dateadd
(
pi_mode IN CHAR,
pi_num IN NUMBER,
pi_startdate IN DATE
)
RETURN DATE
AS
lv_returndate date;
BEGIN
/*-Mode Value --------------------------------
Script by : http://kuasapembina.blogspot.com
----------------------------------------------
'D' = Day , 'W' = Week
'M' = Bulanan 'Q' = Quarter
'H' = Half-Year 'Y' = Year
----------------------------------------------*/

IF pi_mode = 'D' THEN -- Day
lv_returndate := trunc(pi_startdate) + pi_num;
END IF;

IF pi_mode = 'W' THEN -- Week
lv_returndate := trunc(pi_startdate) + (7 * pi_num);
END IF;

IF pi_mode = 'M' THEN -- Month
lv_returndate := add_months(trunc(pi_startdate), pi_num);
END IF;

IF pi_mode = 'Q' THEN -- Quarter
lv_returndate := add_months(trunc(pi_startdate), (3 * pi_num));
END IF;

IF pi_mode = 'Y' THEN -- Year
lv_returndate := add_months(trunc(pi_startdate), (12 * pi_num));
END IF;

IF pi_mode = 'H' THEN -- Half Year
lv_returndate := add_months(trunc(pi_startdate), (6 * pi_num));
END IF;

RETURN lv_returndate;
END;


Cara memanggil script dalam SELECT :

SELECT f_dateadd('D', 3, sysdate) FROM dual;

SELECT f_dateadd('D', 3, to_date('17 nov 2009')) FROM dual;

Di dalam contoh di atas, kedua-duanya menghasilkan jawapan yang sama iaitu :

----------
20/11/2009


Selamat Mencuba.

11.15.2009

Reminder : 45 days left

It is a reminder to me. I have only 45 days left to terminate my credit cards before 1 January 2009.

Starting January next year the government will imposed RM50 credit card service tax on all principal credit card users and RM25 for every supplementary(Budget 2010). The reason cited is to discourage people from unwise spending.

Some people suggest that the RM50 service tax on principal credit cards to be absorbed by the banks that issue them. But Banks are still awaiting further guidelines from authorities before commenting on this. Read here for announcement by Maybank on RM 50 service Tax

So the best option for me is to terminate all the credit cards and leave only one card (for emergency cases: what if car broke down?). For those who want to terminate their cards, don't forget to claim your reward points before doing so.

In case the banks are willing to absorb the tax, then it is no harm to apply it again. Usually banks are giving goodies for new credit card application!