SELECT user.firstname AS parent, child.firstname AS child FROM user LEFT OUTER JOIN user child ON user.userID = child.parentID
If 'child' is the empty string, does the user not have a child, or is the child's record incomplete, perhaps because it wasn't given a name yet (as is not uncommon for the first day after birth). Hard to tell if you don't get back a null. Yes, it's a contrived example, but it illustrates the point. cheers, barneyb On 5/13/05, Ben Rogers <[EMAIL PROTECTED]> wrote: > Actually, I was looking for an example of when you need to know the > difference between a null value and a zero length string in a record set. > > Ben Rogers > http://www.c4.net > v.508.240.0051 > f.508.240.0057 -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
