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.
http://webxadmin.free.fr/article/excel-export-to-text-file-with-chosen-delimi-127.php

Tuesday, September 12, 2006

SQL Date Functions

-- The following sets the first day of the week as Monday
SET DATEFIRST 1

-- 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
SELECT DATEPART(WK, @Month)

-- 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:

http://www.databasejournal.com/features/mssql/article.php/3076421

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=575&lngWId=5

NovickSql.com 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.

http://support.microsoft.com/kb/901200

http://support.microsoft.com/?kbid=907323&SD=tech

http://www.kbalertz.com/Feedback_901200.aspx

Good Luck.

LinkWithin

Related Posts with Thumbnails