Check it out!
I went to the cinema again last night and saw Transformers - all i can say is wow! From the opening to the end i was speechless - what an amazing movie, action, comedy, romance - the perfect ingredients oh, and kick as special effects and did i mention the robots - oh my god, you have to see it!
Made it to the cinema for first time in ages last night and saw Shrek the Third - i personally didn’t think it was as funny as the others, but seeing the trailer for Transformers made it worth it
And is it me, or have cinema screens got heaps brighter?
Introduced in SQL 2005, CTEs or Common Table Expressions are a pretty cool feature to use. Rather than using a temporary table, a CTE is able to create temporary tables on the fly and perform then performing recursive queries - perfect for building a tree heirarchy.
Take for example, the following code - a pretty normal pageid, parentid relationship exists between nodes (in this case pages within a CMS system).
WITH PageTree(pageid, pageparentid, level,pathstr)
AS
(
select
pageid, pageparentid, 0,cast(pageid as varchar(max)) from pages where pageparentid is null
UNION ALL
Select v.pageid, v.pageparentid, t.level +1 , t.pathstr + ',' + cast(v.pageid as varchar(max)) from pages v
INNER JOIN
PageTree t
ON
t.pageid = v.pageparentid
)
select pageid, pageparentid, level, pathstr
from pagetree
order by pathstr, pageid
Firstly, notice the WITH statement at the top that defines the CTE and the columns that are going to be in your resultant table. Then the initial ’seed’ row is retrieved before the recursion begins. Outside of the WITH statement is the SELECT statement that selects against the CTE. In this example, i’ve create a column named ‘pathstr’ which will contain a comma seperated list of the pages in their heirarchy. Here’s the results;

turns out my Comments have been busted - probably since I upgraded to the version of BlogCFC that added support for comments, i thought it was quiet round here! All fixed now
Unleash those comments!
For the best part of two years now we’ve been running two load balanced ColdFusion Enterprise servers, each with two clustered instances of ColdFusion. We’ve recently started using Fusion Reactor and we can clearly see that one particular instance is not processing any requests. The cluster was created identically on both boxes (and has been running previously) - i’ve checked via the admin instance that the cluster is setup correctly, both the instances on the box are started, I can access the CFIDE for the instance. I’ve restarted instances and IIS but to no avail - any ideas? Is it a case of removing the connector and reinstalling it?
not sure how i forgot, probably all the stuff going on but whilst on holiday in Tenerife at the end of may I asked my other (and better half) Marie to marry me - and she said yes! Boy, I tell you - when you forward plan it, it’s never easy. Getting a ring to a forgeign country, where do you put it - do you check it in or carry it on your person? Well, I opted for the former and typically my suitcase came out 20 minutes after hers!! Anyway, things are moving at a a fast pace already - despite planning for September 2008 wedding we’re finding venues are booked already!!!!
Recent Comments