• Total Source Code: 11
  • Latest Update Code: Dec 31' 13
  • Total Page : 2
  • You currently on page number : 1

Copy Data From Other Table

  • 2013-12-31
  • 228
  • copy,table

if you want to copy some data to table from other table in SQL you can use this query :   INSERT INTO newTable (col1, col2, col3) SELECT column1, column2, column3 FROM oldTable //or you can this, this sample I use to copy saldo from stock table INSERT INTO saldoawal_stock(Periode,KD_Cabang,KD_Gudang,KD_Pallet,KD_barang,qty) SELECT Readmore

Procedure For Search Name

  • 2013-11-04
  • 393

If you are a developer warehouse application, and user want to search customer name by first character of customer name, use this procedure to simplify your job:   create procedure search @kunci as varchar(50) as select * from MS_Customer where left(customername,LEN(@kunci))[email protected]   For use the procedure:   search 'BI'all customer name with first charakter BI like Bily, Bios, Biarn, Readmore

SQL Server 2000 installation fails with "...previous program installation..." error message

  • 2013-10-31
  • 524

When you install SQL Server 2000, this error message may occur: A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup. After the error message appears, the installation will not continue until you address the problem and your restart thw computer but this error still appear. Follow this Readmore

Solve (LSN) Error 9003 When Attach the Database SQL2000

  • 2013-10-11
  • 683

If you have problem when attaching database like "Error 9003: The LSN (12:32:1) passed to log scan in database 'Database_Name' is invalid." to the sql server, you may try this step: STEP 1 : turn off your SQL server  STEP 2 : remove LOG file STEP 3 : this code for attach single file MDF USE master; GO EXEC sp_detach_db @dbname = 'Database_Name'; EXEC sp_attach_single_file_db @dbname = Readmore

Looking for Date and Time Difference

  • 2013-10-07
  • 426

beberapa syntax di bawah ini bisa digunakan untuk mencari selisih antara dua obyek dalam SQL Server syntax mencari selisih tanggal:   select datediff(tanggal1,tanggal2)syntax mencari selisih waktuselect timediff(waktu2,waktu2bisa juga menggunakan syntax berikut dalam field yang berformat datetimeselect timediff("2008-01-01 09:34","2008-02-02 09:45")   semoga bisa membantu Readmore

Error 945 SQL Server 2008

  • 2013-08-20
  • 398

SQL SERVER – FIX : Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server error log for details Kasus ini terjadi ketika saya mau akses database SQL server 2008 dimana database tetap dikenali dan tidak dalam status offline/suspect namun tidak bisa di buka, ketika saya buka propertinya muncul pesan warna merah di atas, Database Readmore

Enter removing Signs In Field (string)

  • 2013-08-14
  • 610

Take an example, when in the program appear:Jl. Mazda No.1Jakarta UtaraWhen type the command select addresses from ms_customer it would appear:Jl. Mazda No.1 Jakarta UtaraStraight 1 line / row for the SQL statement format space / enter and other non-visual character will not be shown, but all the functions in the computer already has the standard of writing the alphabet with ASCII code, which you Readmore

SQL Database backup using Query

  • 2013-07-31
  • 301

A database is a data fital any sophisticated programs that use databas this is the core of all database activities. Therefore, in general, the database administrator must back up the data possessed anyone to use at any time when the active database is damaged or want to create a clone database in other places with the same structure. Here is an example query to Microsoft SQL 2008 database Readmore

Restore and Backup Database MSSQL Using Query

  • 2013-07-31
  • 647

Database that has been in the full backup can be restored using 2 stages as below: Step 1: See the logical file name of the database backup file. RESTORE FILELISTONLY FROM DISK='D:\BackuFileName.BAK' Go Step 2 :Use the logical name in the database to be used in the second stage. Make Database to mode user single ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK Readmore

Deleting Log MSSQL Database

  • 2013-07-31
  • 533

The more transactions, the greater the size of the database, the greater the size of the database means that many of the processes that have occurred, the whole process was well saved by the server in the LOG file. For most who frequent database Meadowsweet sometimes this can be a problem if the size of the LOG become increasingly bulge to shrink it needs to be done in order to be efficient Readmore