Join Table - SQL SERVER 2000



join table in the query analyzer in sql server 2000 there are 4 types:
  • inner join is the merger of two related tables which are later shown only the columns that relate only.
  • left join the merger of two related tables which were later shown all the columns that relate to the standard table, while the left-right column of the table is usually a null value if there is no relationship.
  • right join the merger of two related tables which were later shown all the columns that relate to the standard table, while right-left column of the table is usually a null value if there is no relationship.
  • full outer join is a combination of left and rigt join join

for more details, please type the following transact in your sql query analyzer, and run .... good luck ....


transact :


create database tabeljoin

use tabeljoin

create table penduduk
(
noKTP int,
namadepan varchar(20),
namabelakang varchar(10),
tgllahir varchar(30),
alamat varchar(18)
)

insert into penduduk values(1011,'Made','Prayoga','16-03-1989','Denpasar')
insert into penduduk values(2021,'Muhammad','Fahroni','25-12-1990','Semarang')
insert into penduduk values(3035,'Petrus','Bai','11-07-1988','Kupang')
insert into penduduk values(4056,'Tigor','Situmorang','19-04-1988','Batak')
insert into penduduk values(5078,'Boaz','Salosa','12-11-1990','Papua')

select * from penduduk

create table pekerjaan
(
namaperusahaan varchar(30),
jabatan varchar(20),
noKTP int
)

insert into pekerjaan values('PT.RCTI','wartawan','3035')
insert into pekerjaan values('BINUS','ass. lab','1011')
insert into pekerjaan values('INDOFOOD','bag.produksi','4056')
insert into pekerjaan values('RIMO','teknisi','9043')
insert into pekerjaan values('PT.ORANGTUA','marketing','50502')

select * from pekerjaan

SELECT penduduk.namabelakang, penduduk.namadepan, penduduk.alamat, pekerjaan.jabatan, pekerjaan.namaperusahaan
FROM penduduk
INNER JOIN pekerjaan
ON penduduk.noKTP=pekerjaan.noKTP
ORDER BY penduduk.namabelakang

SELECT penduduk.namabelakang, penduduk.namadepan, penduduk.alamat, pekerjaan.jabatan, pekerjaan.namaperusahaan
FROM penduduk
LEFT JOIN pekerjaan
ON penduduk.noKTP=pekerjaan.noKTP
ORDER BY penduduk.namabelakang

SELECT penduduk.namabelakang, penduduk.namadepan, penduduk.alamat, pekerjaan.jabatan, pekerjaan.namaperusahaan
FROM penduduk
RIGHT JOIN pekerjaan
ON penduduk.noKTP=pekerjaan.noKTP
ORDER BY penduduk.namabelakang

SELECT penduduk.namabelakang, penduduk.namadepan, penduduk.alamat, pekerjaan.jabatan, pekerjaan.namaperusahaan
FROM penduduk
FULL JOIN pekerjaan
ON penduduk.noKTP=pekerjaan.noKTP
ORDER BY penduduk.namabelakang

Seven Remix - Change your xp to be windows 7

This time I have a few alternatives for changing the look of your windows xp. One of the new product is a corporation microsoft windows 7. Views from windows 7 is very interesting and simple. For computer users who want to display your windows xp windows slightly manipulated to 7, I have a suggestion, install seven remix program on your computer. After going through several processes in the installation and then restart your computer then you will be surprised. Wow, my computer operating system windows 7 now ... hahahahaha. Layman may be surprised to see this, but at least be a little refreshing your mind in working with computers. New look is a new inspiration. Please download the software by clicking the picture below .....



Fibonacci Number created by Visual Basic 6.0

Fibonacci numbers are a sequence of numbers where the next line is the result of the sum of the two previous numbers. Or in other words, the numbers n or F (n) is the result of F (n-1) + F (n-2). The first and second numbers are usually initialized with 0 and 1, though not a necessity. Examples of Fibonacci numbers with the initial 0 and 1 are as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, ..., etc..


Display the following program has been successfully implemented:


 




If there are friends who want to know syntak program, please leave your comment on this post or send your request to my email address (andykurniaprayoga@gmail.com)

Decimal to Roman Number created by JAVA SDK

import java.util.*;

public class BilanganRomawi {
public static void main (String args[])
{
int bil;
String tampil="";

System.out.println("===================================================");
System.out.println("PROGRAM KONVERSI ANGKA DESIMAL MENJADI ANGKA ROMAWI");
System.out.println(" created by Made AndyKurnia Prayoga ");
System.out.println("===================================================");
System.out.println(" ");

//inisialisasi berupa array
String [] biasa = {"","I","II", "III", "IV", "V", "VI", "VII", "VIII", "IX"};
String [] sepuluh = {"", "X", "XX","XXX","XL"};
String [] limapuluh = {"", "L", "LX", "LXX", "LXXX","XC"};
String [] seratus = {"", "C", "CC", "CCC", "CD"};
String [] limaratus = {"", "D", "DC", "DCC", "DCCC", "CM"};
String [] seribu = {"", "M", "MM", "MMM", "Mv", "v"};

// inputan dari keyboard
System.out.print("Masukkan bilangan desimal : ");
Scanner obj = new Scanner(System.in);
bil = obj.nextInt();

//kondisi dimana angka tdk lebih dari 5000
if (bil>5000)
{
System.out.println("Maaf.., Angka Desimal Yang Di "+
"Inputkan Harus Di Bawah 5000");

}
else
{
//definisi
int lmrts = bil % 1000;
int srts = lmrts % 500;
int lmpl = srts % 100;
int spl = lmpl % 50;
int ak = spl % 10;

int a = bil/1000;
tampil += ""+seribu[a];

//aturan konversi desimal ke romawi
if ( (lmrts >=900) && (lmrts <= 999))
{
tampil += "CM";

//90
if( (lmpl >= 90) && (lmpl <= 99) )
{
tampil += "XC";
int f= ak/1;
tampil += ""+biasa[f];
}
else
{
int d = lmpl/50;
tampil += ""+limapuluh[d];
int e = spl/10;
tampil += ""+sepuluh[e];
int f= ak/1;
tampil += ""+biasa[f];
}

}

else
{
int b = lmrts/500;
tampil += ""+limaratus[b];

//400
if ( (srts >= 400)&& (srts <= 499) )
{
tampil += "CD";

//90
if( (lmpl >= 90) && (lmpl <= 99) )
{
tampil += "XC";
int f= ak/1;
tampil += ""+biasa[f];
}
else
{
int d = lmpl/50;
tampil += ""+limapuluh[d];
int e = spl/10;
tampil += ""+sepuluh[e];
int f= ak/1;
tampil += ""+biasa[f];
}

}

else
{
int c = srts/100;
tampil += ""+seratus[c];

if((lmpl >= 90)&&(lmpl <= 99))
{
tampil += "XC";
int f= ak/1;
tampil += ""+biasa[f];
}
else
{
int d = lmpl/50;
tampil += ""+limapuluh[d];
int e = spl/10;
tampil += ""+sepuluh[e];
int f= ak/1;
tampil += ""+biasa[f];
}
}
}

System.out.println(" ");
System.out.println("Maka angka Romawinya " +tampil);
System.out.println(" ");
System.out.println("========================================");
System.out.println(" ");
System.out.println("Konversi dari angka Desimal " +bil+ " adalah angka Romawina " +tampil);
System.out.println(" ");

System.out.println("===================================================");
System.out.println(" TERIMA KASIH SUDAH MENGGUNAKAN PROGRAM INI ");
System.out.println("===================================================");

}
}
}


java program - display consonants

This program is a simple java program designed to display the consonants of the sentence or word that we enter. For example if we enter a " BUDI " the output from when we run the program is "BD". Here's the source code of the program that I mean

class HurufKonsonan{
public static void main(String args[]){

System.out.println("******===================================******");
System.out.println(" PROGRAM OUTPUT HURUF KONSONAN ");
System.out.println("******===================================******");
System.out.println("");
String[]nama={"M","a","d","e"," ","A","n","d","y"," ","K","u","r","n","i","a"," ","P","r","a","y","o","g","a"};
for(int i=0;i< nama.length ;i++)
System.out.print( nama [i] );
System.out.println(" ");
for(int i=0;i< nama.length ;i++)
{
if
(nama[i].equals("A")|nama[i].equals("a")|nama[i].equals("I")
|nama[i].equals("i")|nama[i].equals("U")|nama[i].equals("u")
|nama[i].equals("E")|nama[i].equals("e")|nama[i].equals("O")
|nama[i].equals("o")
)
System.out.print(" ");
else
System.out.print(nama[i]);
System.out.print("");
}
System.out.println(" ");
System.out.println("");
System.out.println("==========================");
System.out.println("");


String[]nama2={"I"," ","M","a","d","e"," ","S","u","k","r","i","s","n","a"};
for(int i=0;i< nama2.length ;i++)
System.out.print( nama2[i] );
System.out.println(" ");
for(int i=0;i< nama2.length ;i++)
{
if
(nama2[i].equals("A")|nama2[i].equals("a")|nama2[i].equals("I")
|nama2[i].equals("i")|nama2[i].equals("U")|nama2[i].equals("u")
|nama2[i].equals("E")|nama2[i].equals("e")|nama2[i].equals("O")
|nama2[i].equals("o")
)
System.out.print(" ");
else
System.out.print(nama2[i]);
System.out.print("");
}
System.out.println(" ");
}
}

congratulations try...........