Importing CSV File Into SQL SERVER Database using BULK INSERT

Importing data into a database from a delimited file is perhaps one of the most common tasks that one might have to perform. SQL server gives us an import utility which supports various data sources and has an intuitive interface as well, however there is another way which can be utilized to quickly get the job done, its called BULK INSERT

BULK INSERT is a SQL command which can be typed in management console, takes various parameters to control the import and is very simple to use.

Read more →

Importing Exporting CSV Files in PostgreSQL Databases via COPY

This is going to be a short article which will illustrate importing and exporting a table from or to a csv file using PostgreSQL COPY command.

Importing a table from CSV

Assuming you already have a table in place with the right columns, the command is as follows

COPY <TargetTableName> FROM ‘/path/to/csv/SourceCSVFile.csv’ DELIMITERS ‘,’ CSV;

Exporting a CSV from a table.

COPY <SourceTableName> TO ‘/path/to/csv/TargetCSVFile’ DELIMITERS ‘,’ CSV;

Read more →

Raphael JS Tutorial - Part I

Raphael.JS is a SVG/VML library which helps you to create quick vector shapes and images. Its very small and compact (only 86kb),easy to use, well documented and works in all browsers and yes even IE. Here is a list of all major browsers this library works on: Chrome 5.0+ Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+

,finally its distributed under MIT license. In this tutorial ,I intend to introduce basics of this library and help you get started.

Read more →

How to configure Apache mod_wsgi

I am a big fan and user of python. One of the most popular ways to create a quick web app in python is via using mod wsgi.

The aim of mod_wsgi is to implement a simple to use Apache module which can host any Python application which supports the Python WSGI interface.

The module would be suitable for use in hosting high performance production web sites, as well as your average self managed personal sites running on web hosting services.

Read more →

Serve the contents of any directory with Python’s SimpleHTTPServer

Generally, when I am in a middle of prototyping a concept or in a need of quickly executing Ajax requests or using browser features which would need the page to be hosted on a web server, I use Python’s SimpleHTTPServer module.

Python’s SimpleHTTPServer is a great way to serve the contents of the current directory, all one needs to do is change directory and execute a command which will expose all contents as if they were hosted in a web page.

Read more →