Help required with SQL query
Posted in 1998
Hi All, Picture, if you will, a table with two columns and the following data: lookupid description 001 trousers 002 jackets 003 shirts 004 suits 005 knitwear 006 waistcoats Now, what I want to do is perform a select statement that when processed will show the following output: 001 002 003 other where 'other' is the grouping of 004, 005 and 006 As things stand, the ACE report I am modifying has just one select statement and processes all of the above data as seperate items but now I need to group a few of them into one. I'm sure I can come up with something involving a temporary table but it would be nice to do it in one. One further thing, although I don't need to do it for this report, let's say I wanted to produce the following output: other1 other2 other3 where 'other1' is the grouping of 001 and 002, 'other2' is the grouping of 003 and 004, and 'other3' is the grouping of 005 and 006. Is this doable in one go? Interesting one this isn't it? :-) Any help/assistance given would be extremely very welcome. Cheers, Ian.