30 July 2016

Fill Data To a Different Table Database

Sometimes we have to be able to fill the data in a different database tables. For example, the data in the table in the database that is now being used accidentally deleted, this is one of the terrible things that could happen to a programmer, to overcome it we can use the database backup to restore the data, although not all data can be restored , but a minimum of 90% or 95% of the data can be restored if we have a database backup, but otherwise it would be difficult to overcome, or even can not be at all: D. 

To fill the data in different tables database in Sql Server 2008, code is essentially as follows: 

Insert Into [database name]. [Dbo]. [Table Name] 
Select * From [database name]. [Dbo]. [ The table name] 

Example: 
Insert Into RunningDatabase.dbo.Patient 
Select * From BackupDatabase.dbo.Patient

29 July 2016

How To Execute a Stored Procedure in Sql Server 2008

Sometimes there are moments when we have to reexecute a Stored Procedure in SQL Server, for example due to an error on the line before the Stored Procedure executed that causes the data that should be inserted through the Stored Procedure be entered. Let's say this happened in the case which led to the registration module registration fails. One way to do this is by executing back Stored Procedure that have not been executed, but of course before must be identified first Stored Procedures are not being executed. The easiest way to execute a Stored Procedure is to use strored Execute feature in SQL Server Management Studio.

1. Right-click in the Object Explorer, select Execute Stored Procedure



2. Fill in the value for each parameter.


3. Click OK, SQL Server Management stuido will immediately generate the code to execute Stored Procedures complete with pre-loaded parameter value already filled out before us and the code will be directly executed

23 July 2016

Implementasi SIMRS di RSUD Tulungagung

Assalamualaikum

Pada postingan kali ini penulis ingin berbagi foto-foto ketika penulis melakukan implementasi SIMRS modul Pendaftaran Rawat Jalan plus Bridging BPJS di RSUD Tulungagung pada hari kedua. Berikut foto-fotonya.








SQL Server 2008 Membuat Query Update Menggunakan Query Designer

SQL Server 2008 memiliki fitur Query Designer, fitur ini digunakan untuk membuat query secara visual. Dengan menggunakan fitur ini pembuatan sebuah query akan lebih mudah dan lebih cepat. Pada tulisan kali ini penulis akan memberikan contoh bagaimana membuat sebuah query update menggunakan Query Designer. Query yang akan penulis buat adalah query untuk melakukan update pada sebuah tabel yang mana value updatenya diambil dari tabel lain. Pada contoh ini tabel yang akan diupdate adalah tabel Pasien dan value updatenya diambil dari tabel tbPasien. Field yang akan diupdate pada tabel Pasien adalah NoIdentitas dan Field sumber value dari tabel tbPasien adalah cNoKTPSIM. Berikut langkah-langkahnya.

1. Klik kanan pada query editor, pilih Query Designer.



2. Pada window Add Table, pilih tabel yang akan diupdate dan tabel yang menjadi sumber valuenya


3. Hubungkan primary key kedua tabel tersebut, kemudian klik kanan pada area yang kosong, kemudian pilih Change Type->Update



4. Pada window update table pilih tabel yang akan diupdate valuenya


5. Kemudian centang field NoIdentitas pada tabel Pasien, kemudian ketik pada kolom New Value dengan cNoKTPSIM


6. Klik OK. Setelah itu akan muncul query update di query editor





Pengumuman