Thursday, December 14, 2006

Excel Files: Changing the Delimiter to | from ,

Yes, you can set a pipe rather than a comma as a delimiter. It does not depend completely on Excel. It depends on Windows. The quickest way is to save the file as a CSV file.

To change the default on your PC to a pipe rather than a comma bring up your default options window by clicking Start -> Settings -> Control Panel -> Regional Settings.

Click the "Number" tab and in the "List Separator" field, replace the current default separator with the one you want to use (let's say a pipe symbol | ).

Click "OK" to save the change and close the window. You can now save Excel files as pipe delimited files by simply doing the following in Excel:

Open or Create a new file in Excel.
Click File => Save As on the menu bar.
In the "File Type" drop down, select "CSV (comma separated values) *.csv".

You can find the original post for the above here.

Tuesday, September 12, 2006

SQL Date Functions

-- The following sets the first day of the week as Monday

-- Given a date
DECLARE @tDate datetime
SET @tDate = '10/1/2006'

-- Week number in a month for a specific date
SELECT (datepart(ww,@tDate)) + 1- datepart(ww,dateadd(dd,-datepart(dd,@tDate),@tDate)) nWeek

-- Week Number of the Year

-- First Day of the Month
SELECT DATEADD(mm, DATEDIFF(mm,0,@Month), 0)

Some links where you can find more sql date functions are as follows: has many sql functions that can be useful in the daily life of a sql server developer

Wednesday, April 19, 2006

Analysis Server 2000 + Service Pack 4

Now a days I am working on the Analysis Server 2000. So I shall try to share some things of my experiance for following few days.

Analysis Server 2000 with service pack 4 has this following bug when you try to access it from Sql Query Analyzer.

Server: Msg 7358, Level 16, State 1, Line 1

Try the following links for that. What they recommend is to get a hot fix for it. and dont get that hotfix if the issue is not critical for you.

Good Luck.


Related Posts with Thumbnails