Monday, October 03, 2005

Using a spreadsheet to simplify data entry

I've used a spreadsheet for data entry on a number of occasions. It is quite handy! All it requires is a string concatenate function, and a bit of cleverness. This is great for "quick-n-dirty" data entry, or for searches. The comma separated list is usually used for "SELECT * FROM TBL WHERE X IN ( ## excel text goes here ## )".

# to build a comma separated list
=CONCATENATE("'", A2, "',")

# insert new records
=CONCATENATE("INSERT INTO #t (Nbr, Code, Descr) VALUES ('", A4, "', '", B4, "', '", C4,"');")

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home