Browse by Tags

All Tags » SQL (RSS)

Operation could destabilize the runtime

I was trying to reproduce Repository pattern that Rob Conery was using in his MVC Store Front project in my own project. Continuing with the interface programming style hype, I decided to make everything implement some sort of an interface. So my domain...
Posted by Jimmy Chandra | with no comments

Transforming Denormalized Tabular Data to Hierarchical XML Using SQL Server (2005)

A friend of mine asked me today if there is any easy way to transform a table / query result that is quite tabular like the one in the table below to a hierarchical XML format just by using T-SQL query. Id Product Activity 1 Product A Activity A 2 Product...
Posted by Jimmy Chandra | 2 comment(s)
Filed under: ,

Using Alias on SQL Server 2005 Express

Today, somebody asked about how to reconfigure a default setup of SQL Server 2005 Express so you don't have to include the Instance name. I've encountered this kind of problem myself in the past. I mean... come on... what the heck with that long *#*^#...
Posted by Jimmy Chandra | 1 comment(s)
Filed under:

SQL DateTime Conversion CAST vs CONVERT

SELECT GETDATE(), CAST(GETDATE() AS VARCHAR(25)), CONVERT(VARCHAR(25), GETDATE(), 21) Hmm... something to think about when you need to get precision conversion. Never assumed that CAST will produce the expected result. 2006-08-12 01:31PM is a lot different...
Posted by Jimmy Chandra | 8 comment(s)
Filed under: