Welcome to blogs.conchango.com Sign in | Join | Help

Welcome to blogs.conchango.com

Browse by Tags

All Tags » SQL
Showing page 1 of 6 (55 total posts)
  • DRY SQL

    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: ...
    Posted to SSIS Junkie (Weblog) by jamie.thomson on July 2, 2009
  • UPDATE FROM the Sybase code museum

    UPDATE FROM is dead … or it should be. Hugo Kornelis has done a good job of explaining why. Apart from a badly thought out and non-portable syntax, UPDATE FROM suffers a notorious bug/feature. I say “notorious” but it’s probably not notorious enough because it is still common to see people get tripped up by it. If I write: UPDATE Alpha SET z ...
    Posted to Data Based (Weblog) by David.Portas on June 24, 2009
  • DB2 9.7 and Database Type Safety

    DB2 has some new features that are aimed at customers who want to transition from Oracle to DB2: http://www-05.ibm.com/ch/events/symposium/pdf/9_M_Obrecht_IBM_Symposium_2009.pdf IBM are emphasising the improved snapshot isolation, PL/SQL support and packages (“modules” in IBM’s terms). One “feature” that caught my eye is support for implicit ...
    Posted to Data Based (Weblog) by David.Portas on June 24, 2009
  • Get on my cloud...

    I have been dipping my toes into the cloud and found some pretty exciting stuff from Amazon. Simple DB is Amazon's web service database and it is now in unlimited beta which means that anyone can sign up and start using the service free (some restrictions), just signup here. There are loads of technical resources and also a pretty complete FAQ ...
    Posted to John Brookmyre's Blog (Weblog) by john.brookmyre on December 9, 2008
  • An Epitaph for a Stored Procedure (no, not really)

    Simon Evans some time ago questioned if given the parametric nature of queries generated by ORMs, stored procedures still have a place in developers toolbox? At the end of the day why bother if ORMs seem these days seem to do everything for free? It looks to me that statement that ''stored procedures are dead'' (although Simon has never said that) ...
    Posted to Memoirs of a Plumber (Weblog) by marcin.kaluza on November 10, 2008
  • Getting rid of Getdate()...

    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 ...
  • Using a Bitmask - a practical example

    A colleague of mine asked for a simple example to get him up and running with the basics of bitmasking.  Since I had gone to the effort to create the example I thought I might as well blog it :o). This example uses the logical AND operator &. First of all you need to define your table.. create table BitmaskDemo (ID int Primary ...
  • T-SQL IDENTITY : Fun and Games with DBCC CHECKIDENT

      This issue caught me out today whilst putting together some build scripts for reference data. So I thought I’d share it. USE [tempdb] GO CREATE TABLE [dbo].[Table_1](       [Col1] [int] IDENTITY(1,1) NOT NULL,       [Col2] [char](1) NOT NULL ) ON [PRIMARY] GO delete from ...
  • Update on T-SQL MERGE

    The MERGE syntax I used here has changed. In 2008 RC0 the ''WHEN SOURCE NOT MATCHED'' clause is replaced with ''WHEN NOT MATCHED BY SOURCE'' which is supposed to make the meaning clearer. Although MERGE is part of standard SQL 2003 it's worth noting that the SOURCE NOT MATCHED / NOT MATCHED BY SOURCE clause is not part of the standard. ...
    Posted to Data Based (Weblog) by David.Portas on June 9, 2008
  • Talk techie to me

    Friday’s community day was all geared towards collaboration. What I found fascinating was the ''speed dating''. Not real dating, mind. The format was the same, but the outcome was to encourage all the different disciplines that make up Conchango to get to know each other better. So I had 3 minutes apiece to talk to five or six people from the ...
    Posted to Tayler Cresswell's blog (Weblog) by tayler.cresswell on April 13, 2008
1 2 3 4 5 Next > ... Last »
Powered by Community Server (Personal Edition), by Telligent Systems