Oracle, Web, Script, SQLserver, Tips & Trick

February 7, 2014

Decimal with comma (,) or dot (.) conversion to number Oracle

Filed under: oracle — sikathabis @ 9:17 am
Tags: ,

/** source code **/

Create or Replace FUNCTION RET_NUMBER (ntext VARCHAR2) RETURN number IS
vnum number;
c number(1);
s varchar2(1):=null;
begin
–cari karakter desimal dulu
select instr(ntext,’,’) into c    from dual;
if c = 0 then
select instr(ntext,’.’) into c from dual;
end if;
–jika ketemu ambil karakternya
if c > 0 then
s:= substr(ntext,c,1);
end if;
begin
select to_number(ntext) into vnum from dual;
exception when others then
begin
–jika error maka replace karakternya dari . menjadi , atau sebaliknya
select to_number(replace(ntext,s,decode(s,’,’,’.’,’,’))) into vnum from dual;
exception when others then
–jika masih salah maka munculkan error
RAISE_APPLICATION_ERROR(-20001, ‘Error konversi number ‘||ntext||’, cek BARIS KE atau kolom angka’);
end;
end;
return vnum;
end;

/** example **/

select ‘number with dot=’|| ret_number(’500.1′) ||’, number with coma ‘ || ret_number(’252,25′) from dual;

January 7, 2014

Route add untuk koneksi berbarengan internet dan jaringan lokal (windows)

Filed under: network,windows — sikathabis @ 12:45 pm
Tags: , ,
Contoh:
IP Jaringan 172.16.15.111 netmask 255.255.255.249 gateway 172.16.15.1
IP Internet 192.168.1.111 netmask 255.255.255.0 gateway 192.168.1.1
Jalankan
  1. CMD
  2. route add 0.0.0.0 mask 255.255.255.0 192.168.1.1
  3. route add 172.16.15.0 mask 255.255.255.249 172.16.15.1

December 25, 2013

How to open or extract or convert .smm file (Using SBU Extractor)

Filed under: Uncategorized — sikathabis @ 5:15 pm
Tags: ,
Just choose the .sbu file and select which data you want! Calender and To Do or Contacts or both.
Do not extract as a single file (choose No) or you will just get one big .vcf file The folder/s will be created automatically and you`ll find there many .vcf files for your phone
example

Reference:

  1. http://www.askmefast.com/How_to_openeditconvert_samsung_smm_files_for_memos_without_kies-qna4923682.html
  2. https://www.lord-luncher.de/

Alternative Download link

 

December 23, 2013

How to kill oracle.exe on windows

Filed under: oracle,windows — sikathabis @ 7:06 am
Tags: , ,

Use tasklist to show all process on windows

Then taskkill to kill pid, for example:

kill process oracle.exe

reference : http://www.dba-oracle.com/t_kill_process_windows.htm

December 8, 2013

Usefull Links for LaTeX

Filed under: latex — sikathabis @ 10:33 pm
Tags:

http://texblog.org/2012/08/29/changing-the-font-size-in-latex/

http://tex.stackexchange.com/questions/47324/superscript-outside-math-mode

http://tex.stackexchange.com/questions/60453/reducing-font-size-in-equation

 

November 13, 2013

Cara menterjemahkan video caption di youtube

Filed under: Audio_Video — sikathabis @ 3:05 am
Tags: , , ,

1. Buka Google Translate

http://translate.google.com

2. Pilih bahasa sumber dan bahasa tujuan, lalu masukkan pada sumber link youtube-nya, sebagai contoh http://www.youtube.com/watch?v=FOTDg7x8oZc

Clipboard013. Click Caption, lalu click Terjemahkan Teks (more…)

October 10, 2013

Cara Testing Performance memakai IoStat dan Vmstat pada linux/solaris/aix

Filed under: linux,server,server:ibm,solaris — sikathabis @ 3:06 am
Tags: , , , ,

Jalankan via putty atau mobaXterm ke server yang dituju

Untuk 3 tahap ini buka 3 putty (putty pertama untuk jalanin create file, putty kedua untuk capture iostat, putty ketiga untuk capture vmstat). Dalam contoh kasus dibawah ini testing create file pada lokasi /oradata , lokasi ini dapat disesuaikan sesuai dengan kebutuhan anda.

Putty 1:

dd if=/dev/zero of=/oradata/testfile bs=1000000 count=89999

Putty 2:

iostat -xtnz 1 300 > /tmp/oradataiostat.log

Putty 3:

vmstat -xtnz 1 300 > /tmp/oradatavmstat.log

Note:

  • Setelah 5 menit di ctrl-c putty pertama, untuk putty kedua dan ketiga akan berhenti jika sudah 5 menit.
    Performance yang bagus dari pengecekan IoStat (oradataiostat.log) dan VMStat (oradatavmstat.log) adalah:
  1. Penggunaan CPU < 50%
  2. Service time  <=10 ms
  3. iops  <= 2400
  4. throughput  <= 200 MBps

Referensi: Ujang Jaenudin

October 5, 2013

Table mapping between sqlserver and oracle

Filed under: oracle,sqlserver — sikathabis @ 12:19 am
Tags: , ,

links : http://technet.microsoft.com/en-us/library/ms151817.aspx

Oracle data type SQL Server data type Alternatives
BFILE VARBINARY(MAX) Yes
BLOB VARBINARY(MAX) Yes
CHAR([1-2000]) CHAR([1-2000]) Yes
CLOB VARCHAR(MAX) Yes
DATE DATETIME Yes
FLOAT FLOAT No
FLOAT([1-53]) FLOAT([1-53]) No
FLOAT([54-126]) FLOAT No
INT NUMERIC(38) Yes
INTERVAL DATETIME Yes
LONG VARCHAR(MAX) Yes
LONG RAW IMAGE Yes
NCHAR([1-1000]) NCHAR([1-1000]) No
NCLOB NVARCHAR(MAX) Yes
NUMBER FLOAT Yes
NUMBER([1-38]) NUMERIC([1-38]) No
NUMBER([0-38],[1-38]) NUMERIC([0-38],[1-38]) Yes
NVARCHAR2([1-2000]) NVARCHAR([1-2000]) No
RAW([1-2000]) VARBINARY([1-2000]) No
REAL FLOAT No
ROWID CHAR(18) No
TIMESTAMP DATETIME Yes
TIMESTAMP(0-7) DATETIME Yes
TIMESTAMP(8-9) DATETIME Yes
TIMESTAMP(0-7) WITH TIME ZONE VARCHAR(37) Yes
TIMESTAMP(8-9) WITH TIME ZONE VARCHAR(37) No
TIMESTAMP(0-7) WITH LOCAL TIME ZONE VARCHAR(37) Yes
TIMESTAMP(8-9) WITH LOCAL TIME ZONE VARCHAR(37) No
UROWID CHAR(18) No
VARCHAR2([1-4000]) VARCHAR([1-4000]) Yes

October 4, 2013

Konversi biner (BCD) menggunakan turbo pascal

Filed under: pascal — sikathabis @ 9:31 pm
Tags:
Program Konversi_Bilangan_Biner;
{$N+}
Uses Crt;
type
    real=extended;
    tipe=real;
var Bin   : string;
    i,j,k : integer;
    biner : tipe;
function Pangkat( a,b : real ): real;
begin
   if a=0 then
      pangkat:=0
   else
      pangkat:=exp( b*ln(a) );
end;
function Desimal( bind : string ) : tipe;
var temp : tipe;
begin
  temp:=0; j:=length( bind )-1;
  for i:=1 to length( bind ) do if bind[i]='.' then j:=i-2;
  for i:=1 to length( bind ) do
  begin
   if bind[i]='.' then
        j:=-1
   else
     begin
        if bind[i]='1' then temp:=temp+pangkat( 2,j );
        j:=j-1;
     end;
  end;
  desimal:=temp;
end;
 (more...)

September 16, 2013

Query untuk melihat ukuran unique index pada table2 tertentu

Filed under: oracle — sikathabis @ 12:06 pm
Tags: ,

–Query
SELECT   segment_name “INDEX_NAME”, ROUND (bytes / 1024 / 1024, 2) “UKURAN (MB)”
FROM   user_segments
WHERE   segment_type = ‘INDEX’
AND segment_name IN
(SELECT   INDEX_NAME
FROM   dba_indexes
WHERE   owner = ‘DBADMIN’ AND uniqueness = ‘UNIQUE’
AND table_name IN
(‘GL_INTERFACE_HIST’,
‘PAJAK_GAB’,
‘TRAN_CIS_NASABAH’,
‘GL_KONSOLIDASI_SYARIAH’));

 

–Hasil

INDEX_NAME    UKURAN (MB)
GL_INT_HIS_IDX1    21181.06
TRAN_CIS_NASABAH_UNIQ_IDX    535.31
PAJAK_GAB1_IDX    496
GL_KONS_SYARIAH_UNIQ_IDX    445.44

Next Page »

The Rubric Theme. Create a free website or blog at WordPress.com.

Pelangi di khatulistiwa....

Mari berbagi kebaikan, pengalaman dan senyum denganku

angkasa13

Ceritanya saya, Pikirannya saya, Hatinya saya

sikathabis

sikathabis semua informasi disini

Don Charisma

because anything is possible with Charisma

fluoresensi

Keinginan itu pasti terwujud, entah 1 tahun, 2 tahun hingga puluhan tahun kemudian. Bersabarlah #cumanmasalahwaktu

Kumpulan gambar favoritku

Kumpulan gambar favoritku

Rumahku Surgaku

Just another way to share

juliansherman

Just another WordPress.com site

waiting room

: dari senyap ruang tunggu, tempat aku menemukan-Mu

New-Rule

my way of the highway

a madeandi's life

something good doesn't have to look difficult

Adam Designer

Love Design, Web Design and Wordpress

Sutoprise Avenue, A SutoCom Source

Success & Satisfaction with the Cloud

Hendra's Weblog

Sharing knowledge is a power

Me and My Life

a dreamer, writer wanna be, and general practitioner

Kali Linux Romania

Smile! You’re at the best WordPress.com site ever

faziazen

a Journal of MomPreneur

Follow

Get every new post delivered to your Inbox.

Join 31 other followers