tag:blogger.com,1999:blog-68702290767544083502023-11-16T13:21:20.283+00:00SQL 4 lifeWelcome to the world of SQL codeChristopher Stobbshttp://www.blogger.com/profile/03018371683511660461noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-6870229076754408350.post-51146526636585927622009-06-11T10:17:00.001+01:002009-06-11T10:17:30.688+01:00Random NumbersThis is going to be a very short post, but I keep seeing it pop up in forums so thought I would put my two cents in. When trying to generate a random number say between 1 and 5, I’m noticing a lot of people using the follow notation: 1: CAST(5 * RAND() + 1 as INT)
<!--CRLF-->
This method will work if you are looking to obtain a single random number. If however you are selecting Christopher Stobbshttp://www.blogger.com/profile/03018371683511660461noreply@blogger.com3tag:blogger.com,1999:blog-6870229076754408350.post-73690332136702691262009-03-26T13:54:00.015+00:002009-03-26T14:54:29.244+00:00The order of INNER JOIN’sI want to address a topic that I think a lot of people have been taught in the past and still live by today. I’ve heard different variations of this “rule” in the years that I have been programming and they go something like this. “Where possible ALWAYS have you smallest tables joined to first.” “Where possible ALWAYS have you largest tables joined to first” So already you might Christopher Stobbshttp://www.blogger.com/profile/03018371683511660461noreply@blogger.com41tag:blogger.com,1999:blog-6870229076754408350.post-45284049174567155562009-03-24T17:01:00.002+00:002009-03-27T12:47:52.949+00:00SSMS – Manage your TemplatesI’ve noticed that some people are struggling with the setting up of their existing templates in SSMS 2005. This posting with deal with two issues. Locating the file path of your templates. Tidying up the default templates. Locating the file path of your templates. There are two locations for templates when working with SSMS 2005: Local Store: C:\Documents and Settings\[Christopher Stobbshttp://www.blogger.com/profile/03018371683511660461noreply@blogger.com3tag:blogger.com,1999:blog-6870229076754408350.post-22956280389770337762009-03-13T13:23:00.001+00:002009-03-13T13:23:29.822+00:00WelcomeHi All, This is my first post on my first blog. For now I will be adding reader links to some other developer’s blogs/sites that I think everyone could learn a lot from. I hope to be adding some of my knowledge and experience to this blog very soon. I would also like to start by saying that some of the code tips and snippets that I will be posting here may sometimes be borrowed from other Christopher Stobbshttp://www.blogger.com/profile/03018371683511660461noreply@blogger.com0