me,myself,english and programming..

Archive for the ‘Database’ Category

500+ FREE Database Model

Wednesday, October 15th, 2008

Do you need a sample database to kick-start your application development for FREE ?

500DatabaseModel

Here you go. 500+ FREE Data Model

Author’s note: None of the Models is the complete and final solution in its area, but any of them can be added to easily and quickly to meet a specific requirement.

Till then…adios. :)

ps:I hope this post can answer most of the question regarding database related issues.

MSSQL – Date Manipulating

Wednesday, September 10th, 2008

By default, result for select getdate() in MS-SQL will be something like below:

getdate()
————————-

2008-09-09 15:01:47.340

CONVERT function can be use to manipulate the date format as per our need.

Using CONVERT:

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

example:

select CONVERT(varchar(25),getdate(),100)

————————-
Sep 9 2008 3:04PM

Below are the lists of style/format for reference :

(more…)

MS-SQL : CHARINDEX Vs PATINDEX

Wednesday, July 2nd, 2008

CHARINDEX and PATINDEX functions return the starting position of a pattern you specify. PATINDEX can use wildcard characters while CHARINDEX cannot.

Imagine you have a BoxNo field with below values in your table.

BoxNo
——
BOX1
BOX3
BOX4
BOX30
BOX123

Using MS-SQL syntax,You will have a few options to separate those values into number.

1.)

select BoxNo,substring(BoxNo,CHARINDEX(‘X’,BoxNo)+1,len(BoxNo)) as No from #temp

2.)

select BoxNo,replace(BoxNo,’BOX’,”) as No from #temp

You will have a result like below:

BoxNo No
—— ——
BOX1 1
BOX3 3
BOX4 4
BOX30 30
BOX123 123

Now, again, imagine your BoxNo having values like below. The above SQL is not valid anymore since the pattern is different already.(These are my imaginary data, real data will not have something like below. :) )

BoxNo
———
BB12
Box1222
MyBox35
My13
MyBoXx123

(more…)

Extract, Transform and Load (ETL) – Part 2

Monday, June 30th, 2008

I have been working on Data Warehousing in the Insurance Company for quite some time. Since 2001 to be exact. ETL is part of data warehouse component. My Introduction post about ETL is somewhere in 2006. Since then, so many things happened. I resign and come back again to the same company,doing the same thing. I’m not sure whether it is good or not but I enjoy doing my current job.

For my dear readers which is new with ETL,

ETL stands for extract, transform and load, the processes that enable companies to move data from multiple sources, reformat and cleanse it, and load it into another database, a data mart or a data warehouse for analysis, or on another operational system to support a business process.

Monitoring almost a thousand ETL job daily is not an easy job. Considering that a few problem might occured while running the jobs. Networking problem,source file not in proper format,database server down,database full,your SQL query getting so damn slow and many other things might occured.

(more…)

Reveals your forgotten mdb password !

Monday, June 16th, 2008

Some of my friends asking about how to reveal protected access file (.mdb) due to some reasons, hence I write this post to help them. :)

Here you go.

Description
===========
This utility reveals the database password of every password-protected mdb file that created with Microsoft Access 95/97/2000/XP or with Jet Database Engine 3.0/4.0 .
It can be very useful if you forgot your Access Database password and you want to recover it.

Known Limitations
==============
* In Access 2000/XP files, this utility cannot recover passwords that contains more than 18 characters.
* This utility shows only the main database password. It cannot recover the user-level passwords.

accesspv

(more…)