Queries for e-Library

Here are the queries for e-Library in KM Portal:

Insert new book:
insert into MS_BUKU (I_BUKU_ID, S_JUDUL, S_PENGARANG, S_TAHUN, S_FORMAT, I_JML_HALAMAN, I_EKSEMPLAR, S_EDISI, S_JILID, S_ISBN, I_JNS_BUKU, I_HARGA, I_BERAT, S_COVER, S_PENERBIT, S_KODE, S_FUNGSI, S_KOTA, S_UDC, S_UKURAN, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS) values ((select (max(I_BUKU_ID)+1) from MS_BUKU),  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, current timestamp, ?, 1)
Insert new book abstract:
insert into TR_RESENSI (I_RESENSI_ID, S_RESENSI, S_ABSTRACT, I_BUKU_ID, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS)” + ” values ((select (max(I_RESENSI_ID)+1) from TR_RESENSI), ?, ?, ?, ?, current timestamp, ?, 1)
Insert book subject:
insert into TR_Subject (I_TR_SBJ_ID, I_BUKU_ID, I_SUBJECT_ID, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS)” +
” values ((select (max(I_TR_SBJ_ID)+1) from TR_SUBJECT),?,?,?, current timestamp, ?, 1)
Insert book location:
insert into TR_LOKASI (I_LOKASI_ID, I_JML_BUKU, S_RAK, I_UNIT_ID, I_SUBUNIT_ID, I_BUKU_ID, I_AVAIL_BUKU, S_PEROLEHAN, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS)” + ” values ((select (max(I_LOKASI_ID)+1) from TR_LOKASI), ?, ?, ?, ?, ?, ?, ?, ?, current timestamp, ?,1)
Insert book category:
insert into TR_KATEGORI (I_TR_KAT_ID, I_BUKU_ID, I_KATEGORI_ID, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS)” + ” values ((select (max(I_TR_KAT_ID)+1) from TR_KATEGORI),?,?,?, current timestamp, ?, 1)
Insert book group:
insert into TR_KELOMPOK (I_TR_KEL_ID, I_BUKU_ID, I_KELOMPOK_ID, I_SUBKELOMPOK_ID, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS)” + ” values ((select (max(I_TR_KEL_ID)+1) from TR_KELOMPOK),?,?,?, ?, current timestamp, ?, 1)
Insert book upload:
insert into TR_UPLOAD (I_UPLOAD_ID, S_BUKU_UPL, I_BUKU_ID, S_USER_ADD, D_USER_ADD, S_IP_ADD, I_STATUS)” + ” values ((select (max(I_UPLOAD_ID)+1) from TR_UPLOAD), ?, ?, ?, current timestamp, ?,1)
Queries for e-Library

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s