Saturday, September 12, 2009

visual studio add-ins

http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionID=7028171&gid=43315&trk=EML_anet_qa_ttle-cDhOon0JumNFomgJt7dBpSBA

Friday, September 11, 2009

The ' ' character, hexadecimal value 0x20, cannot be included in a name

While creating XElement or XMLElement from C# code,
probably you will get below error

Error:
The ' ' character, hexadecimal value 0x20, cannot be included in a name.

Solution:
XElement/attribute does not contain space between node name, make sure your node name doesn't have white spaces.

for example

<Row Total Cost="" />

change to
<Row TotalCost="" />


if you notice second one there is no white space on Attribute TotalCost


hope this helps

Friday, September 4, 2009

Delete Remove duplicate in SQL

1) find duplicate

select name,city,COUNT(1)
from mytable
group by name,city
having COUNT(1) > 1

2) remove duplicate - best way

CREATE TABLE #Table1 (col1 int, col2 int)
INSERT INTO #Table1 VALUES (1, 1000)
INSERT INTO #Table1 VALUES (2, 2000)
INSERT INTO #Table1 VALUES (2, 2000)
INSERT INTO #Table1 VALUES (3, 3000)
INSERT INTO #Table1 VALUES (3, 3000)
INSERT INTO #Table1 VALUES (4, 4000)


SELECT * FROM #Table1;

WITH T1 AS (SELECT (ROW_NUMBER() OVER (PARTITION BY col1 ORDER BY col1)) AS RNum FROM #Table1)
DELETE FROM T1 WHERE RNum IN (SELECT a.RNum FROM T1 AS a, T1 AS b WHERE a.RNum > b.RNum GROUP BY a.RNum)

SELECT * FROM #Table1

DROP TABLE #Table1

3) remove duplicate

SELECT DISTINCT * INTO tab2 FROM tab1 — distinct of all columns
DROP TABLE tab1
EXEC sp_rename ‘tab2′,’tab1′

4) remove duplicate
don't want to tab1
--get distinct duplicate records in #tempTable using option1
--remove all duplicate records from mail table
--insert #tempTable records in to tab1
--drop #tempTable

Tuesday, September 1, 2009

Quote of the day

The indispensable first step to getting the things you want out of life is this: decide what you want.

Saturday, August 22, 2009

top 3 tools beside VS

http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&gid=43315&discussionID=6280586&split_page=1

Friday, August 14, 2009

Adomdclient dll

For SQL 2008, you will get ADOMD client installer here...
http://www.microsoft.com/downloads/thankyou.aspx?familyId=228de03f-3b5a-428a-923f-58a033d316e1&displayLang=en

once you install the above installer you will get
Microsoft.AnalysisServices.AdomdClient.dll
at under the below location
C:\Program Files\Microsoft.NET\ADOMD.NET\100

Thursday, August 13, 2009

documentation tool for SQL Analysis Services

http://bidocumenter.com/Public/Default.aspx


http://www.ssas-info.com/VidasMatelisBlog/144_using-ssrs-to-report-ssas-2008-database-structure-using-dmvs

http://www.elsasoft.org/download.htm