In the last few weeks, a lot of new videos have been posted to Channel9, Microsofts portal for spreading the word about new software...
A lot of the posts are from the JAOO conference, which was held here in Denmark not too long ago. And just like last year, I've seen almost all the videos, and found the pretty cool. It seems like a lot of the videos are about programming languages and/or parallelism, and the evolution in those fields - very intriguing!
Maybe JAOO is a conference I should attend next year.
Anyway, check it out at http://channel9.msdn.com
Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts
Thursday, October 09, 2008
Saturday, September 06, 2008
Auto XML sorted
I've been fighting a bug for some hours now bug have finally found the solution!
Here's the deal: I've developed a tool to import the contents of some files into a database. Furthermore there is a UI for CRUD'ing the now database content. The problem was, that when I imported from more than 10 files (don't know why this exact number, it's purely empirical) the data would show up pretty strange. It should have a format like this:
1 (count: 34)
3 (count: 54)
2 (count: 20)
But instead it was showing:
1 (count: 1)
2 (count: 1)
1( count: 1)
1 (count: 1)
3 (count:1)
... etc.
Weird!
At first I was looking at the import tool - I must have made an error somewhere, but no. The solution was to sort the data! The stored procedure selecting the data uses FOR XML AUTO to generate a hierachical structure, and somehow that twisted the data. But after adding "ORDER BY ColumnName" to the SQL it comes out right!
I don't understand why yet - and can't find any other posts regarding the same topic....
Here's the deal: I've developed a tool to import the contents of some files into a database. Furthermore there is a UI for CRUD'ing the now database content. The problem was, that when I imported from more than 10 files (don't know why this exact number, it's purely empirical) the data would show up pretty strange. It should have a format like this:
1 (count: 34)
3 (count: 54)
2 (count: 20)
But instead it was showing:
1 (count: 1)
2 (count: 1)
1( count: 1)
1 (count: 1)
3 (count:1)
... etc.
Weird!
At first I was looking at the import tool - I must have made an error somewhere, but no. The solution was to sort the data! The stored procedure selecting the data uses FOR XML AUTO to generate a hierachical structure, and somehow that twisted the data. But after adding "ORDER BY ColumnName" to the SQL it comes out right!
I don't understand why yet - and can't find any other posts regarding the same topic....
Subscribe to:
Posts (Atom)