Navigation

Search

Categories

On this page

Registration for VS2008, Sql Server 2008 and Windows Server 2008 launch event now open
Debugging Dot Net Source Code in VS2008
Concatenating rows in a table into a single string using sql
Free e-books from Microsoft Press on VS2008 technologies
Sleepless Sharepoint weekend is back..

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 22
This Year: 12
This Month: 0
This Week: 0
Comments: 7

Sign In

 Monday, January 21, 2008
Monday, January 21, 2008 12:08:49 PM (Mountain Standard Time, UTC-07:00) ( MSEvent | VS2008 )
Registration for the "Heroes Happen Here" MSEvent has now begun.
You can find out more here.



Not only do you get to test drive the new products and meet the experts, but you also get free promotional versions of all 3 products. Its happening in Denver on March 20 at the Colorado Convention Center.

This is really cool, looking forward to this one!!! See you there.

-Latish Sehgal

 Wednesday, January 16, 2008
Wednesday, January 16, 2008 4:51:53 PM (Mountain Standard Time, UTC-07:00) ( )
Its here!! You can now debug the dot net source code in VS 2008. Read more about this in Shawn's post.
I am still not sure how beneficial this will be in day to day programming, but i guess it will be helpful in troubleshooting sometimes. Especially when it looks like we have found a bug in the framework :) (For the record, i never found a bug in the framework).
-Latish Sehgal

Wednesday, January 16, 2008 4:22:21 PM (Mountain Standard Time, UTC-07:00) ( oracle | sql )
Today i came across a new scenario in one of my applications (that talks to an oracle database) where we had to concatenate a field from multiple rows in a table into a single string. While some suggested that  string manipulation could be done inside the web application code after retrieving all the data, my alert (read over-caffeinated) brain was sure that there must be a way to tackle this at the database level by manipulating the sql query. 30 minutes with the Google gods proved me correct. I have created a brief test case with the solution below, if you run into a similar situation.
 To create the test table, run CreateTable.sql (.91 KB) after saving it to your system.
 Our table looks like this, and our goal is to create a concatenated string of all the names.


 
The sql uses SYS_CONNECT_BY_PATH() (used for hierarchial queries), and the final sql is

SELECT LTRIM(SYS_CONNECT_BY_PATH(Employee_Name, ','),',') Concatenated_Names
FROM (
      SELECT Employee_Name, ROW_NUMBER() OVER (order by Employee_Name) rownumber, COUNT(*) OVER () cnt
      FROM (SELECT Employee_Name FROM Employee)
) data
WHERE rownumber = cnt
START WITH rownumber = 1
CONNECT BY PRIOR rownumber = rownumber-1;

Below is the result of the query.


-Latish Sehgal
 Friday, January 11, 2008
Friday, January 11, 2008 12:25:03 PM (Mountain Standard Time, UTC-07:00) ( VS2008 | book review | linq )
MSPress has been offering free e-books for some time on VS2008 technologies. To get yours, go here and grab your copies. The LINQ book has all the chapters but the appendix on Ado.Net Entity framework, whereas the Ajax and Silverlight book have 2 sample chapters each.



I have been wanting to try out LINQ for some time. This is the perfect opportunity, i'll review the book as well as pick up something new. I'll post my review in a later post.
-Latish Sehgal
 Friday, January 04, 2008
Friday, January 04, 2008 3:53:53 PM (Mountain Standard Time, UTC-07:00) ( Sharepoint | sleepless weekend )
Infusion is at it again, they are organizing a sleepless roadshow after the success of the Sleepless in NY sharepoint weekend, which i was fortunate enough to be a part of. Check out this video from last time. I highly recommend these events to any sharepoint/silverlight developers or anybody looking to add learn about these technologies.
This event is sponsored by .Net Rocks and will cover Washington D.C, Atlanta, Dallas, L.A, Silicon Valley and Chicago. And the goodies they give out to participants and winners are just awesome. You have to be there to believe it.

-Latish Sehgal