Sunday, August 2, 2009
I went speechless
Damn...as I arrived at the training center..plus felt so DBA at that time...sweating..but yet excited...someone reached me..saying...- 'I'm so sorry..but your name is not in the list..you are not being registered'...WHAT??????
waited for nearly 45 minutes...sweating...tensed...I just went speechlessss...yup there we go again...my excitement flushed into the toilet!....
called the HR manager..and he said..the company is pulling back the budget for the oracle training..and they are planning to send me for the .NET certification...oh god..oh dear...not again..my body shivered..this happened last year..and its happening again...
started googling...i kept on thinking...and searching...don't we have good market for oracle here in Malaysia?...OR...am i wanting it so much...that makes it real hard to get?
Today Will Be IT!
...today will be my first day of attending the Oracle 11g administration class..Mind setting of the day: I AM A SPONGE....Talked to some experts on this matter...no matter how many courses we attend...the experiences and the skills are so needed in this field rather than a piece of paper..
Okay..got if chief!
Saturday, July 25, 2009
Friday, July 24, 2009
MOSS 2007 References
http://blogs.techconception.com/manny/2008/08/16/WSS30AndMOSS2007Sites.aspx
http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx
http://office.microsoft.com/en-us/sharepointserver/FX101211721033.aspx
http://office.microsoft.com/en-us/sharepointserver/CH102066971033.aspx
http://sharepoint.microsoft.com/blogs/mike/default.aspx
ref: gerald@info-trek.com
http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx
http://office.microsoft.com/en-us/sharepointserver/FX101211721033.aspx
http://office.microsoft.com/en-us/sharepointserver/CH102066971033.aspx
http://sharepoint.microsoft.com/blogs/mike/default.aspx
ref: gerald@info-trek.com
Wednesday, June 24, 2009
Oracle 10g: Flush Data To External Table - Using For Loops & Calling Stored Procedures
I'm using external table as a passage to load data from a flat file ''postcode.CSV' to respective table - "GBL_POSTCODE_DTL ".
Script:
/*
*
* Pump data to table:
*
*
*
* @Migration POSTCODEDIR
* @author Nur Fiza Suhati
* @version 1.0
*
*/
/*
1. Directory to database
*/
CREATE OR REPLACE DIRECTORY POSTCODEDIR AS 'C:\oracle\product\10.1.0\oradata\myep';
DROP TABLE POSTCODE_EXT;
create table POSTCODE_EXT (
ADDRESS varchar2(100),
IDTABLE VARCHAR2(1000),
POSTCODE varchar2(100),
POSTOFFICE varchar2(100),
STATE varchar2(100))
Organization external
(type oracle_loader
default directory POSTCODEDIR
access parameters (records delimited by newline
fields terminated by '')
location ('postcode.csv'))
reject limit 100000;
TRUNCATE TABLE GBL_POSTCODE_DTL;
INSERT INTO GBL_POSTCODE_DTL (ADDRESS,POSTCODE,POSTOFFICE,STATE,ID)
(
SELECT postcode_ext.address,postcode_ext.postcode,postcode_ext.postoffice,
CASE WHEN postcode_ext.state = 'JOHOR' THEN 2
WHEN postcode_ext.state = 'KEDAH' THEN 3
WHEN postcode_ext.state = 'KELANTAN' THEN 4
WHEN postcode_ext.state = 'MELAKA' THEN 5
WHEN postcode_ext.state = 'NEGERI SEMBILAN' THEN 6
WHEN postcode_ext.state = 'PAHANG' THEN 7
WHEN postcode_ext.state = 'PERAK' THEN 9
WHEN postcode_ext.state = 'PERLIS' THEN 10
WHEN postcode_ext.state = 'PULAU PINANG' THEN 8
WHEN postcode_ext.state = 'SABAH' THEN 13
WHEN postcode_ext.state = 'SARAWAK' THEN 14
WHEN postcode_ext.state = 'SELANGOR' THEN 11
WHEN postcode_ext.state = 'TERENGGANU' THEN 12
WHEN postcode_ext.state = 'WILAYAH PERSEKUTUAN' THEN 15
ELSE 19
END AS "state",TO_NUMBER(postcode_ext.IDTABLE)
FROM postcode_ext postcode_ext
);
set serveroutput on
declare
CITYID_ INTEGER;
begin
FOR r IN (SELECT distinct(gbl_postcode_dtl.POSTCODE), gbl_postcode_dtl.POSTOFFICE, gbl_postcode_dtl.STATE FROM gbl_postcode_dtl gbl_postcode_dtl)
LOOP
gbl_address_pckg.SP_ADDDTLCITY(CITYID_,r.STATE,r.POSTCODE,r.POSTOFFICE);
dbms_output.put_line('postcode: ' r.POSTCODE );
END LOOP;
end;
Script:
/*
*
* Pump data to table:
*
*
*
* @Migration POSTCODEDIR
* @author Nur Fiza Suhati
* @version 1.0
*
*/
/*
1. Directory to database
*/
CREATE OR REPLACE DIRECTORY POSTCODEDIR AS 'C:\oracle\product\10.1.0\oradata\myep';
DROP TABLE POSTCODE_EXT;
create table POSTCODE_EXT (
ADDRESS varchar2(100),
IDTABLE VARCHAR2(1000),
POSTCODE varchar2(100),
POSTOFFICE varchar2(100),
STATE varchar2(100))
Organization external
(type oracle_loader
default directory POSTCODEDIR
access parameters (records delimited by newline
fields terminated by '')
location ('postcode.csv'))
reject limit 100000;
TRUNCATE TABLE GBL_POSTCODE_DTL;
INSERT INTO GBL_POSTCODE_DTL (ADDRESS,POSTCODE,POSTOFFICE,STATE,ID)
(
SELECT postcode_ext.address,postcode_ext.postcode,postcode_ext.postoffice,
CASE WHEN postcode_ext.state = 'JOHOR' THEN 2
WHEN postcode_ext.state = 'KEDAH' THEN 3
WHEN postcode_ext.state = 'KELANTAN' THEN 4
WHEN postcode_ext.state = 'MELAKA' THEN 5
WHEN postcode_ext.state = 'NEGERI SEMBILAN' THEN 6
WHEN postcode_ext.state = 'PAHANG' THEN 7
WHEN postcode_ext.state = 'PERAK' THEN 9
WHEN postcode_ext.state = 'PERLIS' THEN 10
WHEN postcode_ext.state = 'PULAU PINANG' THEN 8
WHEN postcode_ext.state = 'SABAH' THEN 13
WHEN postcode_ext.state = 'SARAWAK' THEN 14
WHEN postcode_ext.state = 'SELANGOR' THEN 11
WHEN postcode_ext.state = 'TERENGGANU' THEN 12
WHEN postcode_ext.state = 'WILAYAH PERSEKUTUAN' THEN 15
ELSE 19
END AS "state",TO_NUMBER(postcode_ext.IDTABLE)
FROM postcode_ext postcode_ext
);
set serveroutput on
declare
CITYID_ INTEGER;
begin
FOR r IN (SELECT distinct(gbl_postcode_dtl.POSTCODE), gbl_postcode_dtl.POSTOFFICE, gbl_postcode_dtl.STATE FROM gbl_postcode_dtl gbl_postcode_dtl)
LOOP
gbl_address_pckg.SP_ADDDTLCITY(CITYID_,r.STATE,r.POSTCODE,r.POSTOFFICE);
dbms_output.put_line('postcode: ' r.POSTCODE );
END LOOP;
end;
Oracle 10g: Flush Data To External Table - Using Insert Statement
I'm using external table as a passage to load data from a flat file ''scname.CSV' to respective table - "GBL_SPECIES_MST".
Script:
/*
*
* Pump data to table:
*
*
*
* @Migration SPECIESDIR
* @author Nur Fiza Suhati
* @version 1.0
*
*/
/*
1. Directory to database
*/
CREATE OR REPLACE DIRECTORY SPECIESDIR AS 'C:\oracle\product\10.1.0\oradata\myep';
DROP TABLE SPECIES_EXT;
create table SPECIES_EXT (
ID varchar2(100),SCIENTIFICNAME VARCHAR2(100))
Organization external
(type oracle_loader
default directory SPECIESDIR
access parameters (records delimited by newline
fields terminated by '')
location ('scname.csv'))
reject limit 100000;
TRUNCATE TABLE GBL_SPECIES_MST;
INSERT INTO GBL_SPECIES_MST (SPECIESID,SCIENTIFICNAME)
(
SELECT SPECIES_EXT.ID,SPECIES_EXT.SCIENTIFICNAME
FROM SPECIES_EXT SPECIES_EXT
)
;
Script:
/*
*
* Pump data to table:
*
*
*
* @Migration SPECIESDIR
* @author Nur Fiza Suhati
* @version 1.0
*
*/
/*
1. Directory to database
*/
CREATE OR REPLACE DIRECTORY SPECIESDIR AS 'C:\oracle\product\10.1.0\oradata\myep';
DROP TABLE SPECIES_EXT;
create table SPECIES_EXT (
ID varchar2(100),SCIENTIFICNAME VARCHAR2(100))
Organization external
(type oracle_loader
default directory SPECIESDIR
access parameters (records delimited by newline
fields terminated by '')
location ('scname.csv'))
reject limit 100000;
TRUNCATE TABLE GBL_SPECIES_MST;
INSERT INTO GBL_SPECIES_MST (SPECIESID,SCIENTIFICNAME)
(
SELECT SPECIES_EXT.ID,SPECIES_EXT.SCIENTIFICNAME
FROM SPECIES_EXT SPECIES_EXT
)
;
Wednesday, April 15, 2009
I'm so not rational at the moment....
...Frustated..iyup..i'm all that..
just came out from the boss' room talking 'bout future plan...bla bla...and usually i just snap out from all the topics...but everytime he says 'bout his plan..the only plan that i ever put my eyeballs in will be this database section plan - ORACLE...
meetings over meetings..he'll say..'yes..i need 1 or 2 people in this'...usually there'll be 2 names crafted in my head...and definitely so far i think one out of those 2 names will be 'ME'...
i just can't stand waiting and hoping that it is me whom clutching that OCA or OCP cert...therefore in a relax manner I asked him..who does he want to send for the oracle certification..wohooo!!..I AM NOT HIS FAVOR'..I told him - I've spent my 2 years focusing in 'ONLY' oracle programming..and i really want to move into this path..he just nodded and said, 'oo i need to discuss this with the others'..PLUS..'MR M writes good stored proc'...my prompt answer: 'oo..en K tak tengok saya punye lagi(oo you haven't seen mine yet)'...
..come to think about it...i just feel like my artwork has not being appreciated..i thank you Rohaizal for giving me the opportunity for those oracle training...I don't blame Mr M for being recognized by the boss..maybe he really is good..but If..just If there's someone here to sell my name for that seat...I might be seen...
well..my dreams are not shreadded yet..Backup plan - of course spending my very own kaching...but..I must earn more than what i got today...How? Leaving is one of the options......
just came out from the boss' room talking 'bout future plan...bla bla...and usually i just snap out from all the topics...but everytime he says 'bout his plan..the only plan that i ever put my eyeballs in will be this database section plan - ORACLE...
meetings over meetings..he'll say..'yes..i need 1 or 2 people in this'...usually there'll be 2 names crafted in my head...and definitely so far i think one out of those 2 names will be 'ME'...
i just can't stand waiting and hoping that it is me whom clutching that OCA or OCP cert...therefore in a relax manner I asked him..who does he want to send for the oracle certification..wohooo!!..I AM NOT HIS FAVOR'..I told him - I've spent my 2 years focusing in 'ONLY' oracle programming..and i really want to move into this path..he just nodded and said, 'oo i need to discuss this with the others'..PLUS..'MR M writes good stored proc'...my prompt answer: 'oo..en K tak tengok saya punye lagi(oo you haven't seen mine yet)'...
..come to think about it...i just feel like my artwork has not being appreciated..i thank you Rohaizal for giving me the opportunity for those oracle training...I don't blame Mr M for being recognized by the boss..maybe he really is good..but If..just If there's someone here to sell my name for that seat...I might be seen...
well..my dreams are not shreadded yet..Backup plan - of course spending my very own kaching...but..I must earn more than what i got today...How? Leaving is one of the options......
Tuesday, December 30, 2008
Oracle 10g: Show All Tables Command
Monday, October 20, 2008
Oracle 10g: Change from datatype number to boolean
I was supposed to change a field's datatype from integer to boolean. It took me quite a while to disentangle the problem...so I figure out that table alteration (scripting) in oracle 10g is quite confusing compared to SQL 2000. I kept on receiving this type of error:
*** ORA-01451: column to be modified to NULL cannot be modified to NULL ***
There are multiple solutions being suggested through out the net....but I chose to keep it stupidly simple to solve it....
1. Column to be modified must be empty to change datatype...What I did was:
UPDATE [table_name]
SET [column_name] = NULL
UPDATE GBL_DOCUMENT_MST
SET ISPAYMENT = NULL
2. Now....I can alter the table successfully...
Alter table GBL_DOCUMENT_MST
modify
(
ISPAYMENT CHAR(1) CHECK (ISPAYMENT IN ( 'T', 'F' ))
);
3. Time to Execute!...
Subscribe to:
Posts (Atom)