Hi, I have a table that has following fields;
code, explanation, level1, level2, level3, level4, level5 A xxxx A A01 xxxx A01 A0101 xxxx A0101 etc The problem is that I need to get explanation SELECT explanation based on two things; WHERE code=level(x) AND level(x) LIKE level(x-1) All levels are the same , starting from the beginning and each level adds more defining attributes. Simple LIKE does not work but is there some alternative functions that would allow the comparison? Jari Mäkelä --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php