Friday, June 11, 2004

Padding with 0's infront, to make same length digits (using SQL)

Lets say you have a task to format some digits using SQL so that it has same length for eg: 1,2 23, 346 should chage to : 001, 002, 023, 346 so that all are 3 digit numbers after paddind with 0's infront. It seems so easy to me in C# but when i was asked to do it using SQL statements, i was a bit unsure. so, here is what i discovered.if you are using :
1) MS Access try this
2) MS SQL Server try this
3) IMB DB2 the keyword you've gotta look up is DIGITS (then use SUBSTR).
What DIGITS does is that it returns a character string representation of its argument. you can use DIGITS to given you a string something like this '000000002'(assuming current number we are working on is 2)
Then you have to use SUBSTR to pull out the last 3 digits(if you are trying to pad to 3 digits)
There ya go its all set!Cheers!

Tuesday, June 08, 2004

Forgot that ConnectionString?

Forgot that Connection String? You will find it right here!Cheers!

Good MSDN Enterprise Software Layering example

Software layering has been one of the things that always interest me, you can take a look at the MSDN sample : Architecture of Fitch and Mather 7.0

Free ASP.NET Web hosting

check out this cool free ASP.NET hosting site WebmatrixHosting for .NET DevelopersCheers!

Friday, June 04, 2004

Hillsongs in Singapore

Hillsongs was in town for the 18th year of Festival of Praise. The Festival of praise was held yesterday and today at The Indoor Stadium. I went with my friends on saturday and had a great time worshiping The Lord!

Thursday, June 03, 2004

Fun facts for VS.NET 2003

Here is a link i found from Chris Sells' page; its a compilation of fun facts and traps for Visual Studio.Net 2003. Real great stuff! check it out here

Using pic. HTML table background info

Found out something i didnt know about tables and their background images.. below is a section i copied from http://www.workz.com/
At first glance, this is the obvious method. However, use it only if the vast majority of your visitors use Explorer (in a company Intranet, for example). In Netscape, your table display will be a mess. Yes, it will catch the eye - but for the wrong reason.

- Explorer displays the image as you expect - a single background picture. NOTE: Explorer will tile the image if the width and height of your table exceeds the size of the image.
- Netscape displays the image inside each separate field of the table. If your table definition includes 4 columns and 5 rows, then the same slice of your image will repeat 20 times (once in each field). if you need to find out how to fix the netscape problem : you can go here.but the reason i made this entry is due to this line as stated above :NOTE: Explorer will tile the image if the width and height of your table exceeds the size of the image.



This page is powered by Blogger. Isn't yours?

© Copyright 2005, Rohan Thomas
Disclaimer
This Blog contains findings that are self-explored and expressions that are self-evoked. They are by no meanss representions of my employer's view.