|
|
Browse by Tags
All Tags » t-sql
Showing page 1 of 4 (40 total posts)
-
I recently inherited some SQL that someone else had written and had the job of “tidying it up” before it gets pushed out to production. Here’s a slightly simplified (yes, simplified) version of that SQL: 1: --options
2: select asset_class
3: , case when volume > 0 then 'profit'
4: ...
-
In SQL 2005 we could write something like this: declare @i int
select @i = dbo.udf_MyScalarFunction()
exec usp_MyStoredProc @i In SQL 2008 we can write the same functionality more succinctly like this: declare @i int = dbo.udf_MyScalarFunction()
exec usp_MyStoredProc @i Wouldn’t it be nice if, in the future, ...
-
I’m glad to report that, 2 months after I launched it, SQL Server Mesh code repository is still going strong. We’re now approaching 100 members (there were 53 at last count) with more members and more content being added every day. If you are submitting content then I encourage you to blog about it, tweet about it (use hashtag #sqlmesh) and/or put ...
-
Simon Sabin just published a blog post Where should the ON clause go? where he explained his penchant for writing ON predicates for JOIN clauses on the same line so he can easily spot them like so:
select track, level, title, Name, ss.length
from ConferenceSession cs
join ...
-
Three weeks ago I posted a blog entry entitled SQL Server code repository on Live Mesh where I announced the creation (if that’s the right word) of a folder, hosted on Live Mesh, that anyone in the SQL Server community could get access and contribute to. Since then the uptake has been pretty good; we’ve got 53 members and that number has been ...
-
Those who know me may be aware that as well as my obvious interest in SQL Server I also have a very keen interest in Windows Live and specifically in Live Mesh, an incubation technology from Microsoft that synchronises data between different devices and the cloud (go to Live Mesh Overview to learn more about it).
Over the past couple of months I ...
-
[Although I colloquially refer to myself on this blog as “SSIS Junkie” it won’t have escaped the notice of regular readers that I haven’t been talking about SSIS much lately, in fact nothing of real substance in regard to SSIS has appeared here since Nesting variables to calculate values on 24th October. The reason for that is that I simply ...
-
SQL Server 2008 definitely has loads of improvements over previous versions, however there are some cool new features that are overlooked which could improve productivity and ease usability, so they are definitely worth having a look at.
1. Compound Operators
This new feature do make some interactions ...
-
Crikey. That title sounds like an essay I had to write when I was at school and that was a long time ago...
Jamie Thomson raised an important point in a comment on a blog I posted yesterday entitled "Getting rid of getdate()". In it I stated that ISNULL() and COALESCE() are in the same boat as getdate() and ...
-
Ok I admit - I use it. Pretty much everyone I know uses it and yet I feel dirty when I do.
Why? Well it's not portable SQL and most certainly not ANSI standard. I need to get the datetime I hear you say. How do I do this without getdate()?
There is a perfectly good substitute in the form of CURRENT_TIMESTAMP that is ...
1
|
|
|