Andrew Channels Dexter Pinion

Wherein I write some stuff that you may like to read. Or not, its up to you really.

December 17, 2001

Quality SQL

Here is some quality SQL;

SELECT decode(customer_class_code, '', 'Distributor', customer_class_code)
FROM ra_customers

Someone should really learn how to use 'NVL'. Mind you, as I said to Mr Kelly when we found that code, this is the reason people like us are never going to be short of work.

Posted by Andy Todd at 03:44 PM | Comments (0)

December 13, 2001

C Programming

This is why I hate coding in c. The simplest program in the world;

#include <stdio.h>
int main()
    char *string = '\0';
    strcpy(string, "my string"):

Core dumps. If I change the definition of 'string' to char string[255]; everything is hunky dory.

I don't know why, but I'm bloody well going to find out.

Posted by Andy Todd at 02:11 PM | Comments (0)