View Single Post
  #1 (permalink)  
Old November 22nd, 2003, 07:15 AM
Jane Jane is offline
Authorized User
 
Join Date: Jun 2003
Location: Shah Alam, Selangor, Malaysia.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Find Out First Item of each item Group

Hi,

I have a table as below:

item code
A01000
A01001
A0100A
A0100B
A0102B
A0102C
A0102D
B01041
B0104A
B0104C
.
.
.

from a table above, i want to list out a reault as this:


ITEM CODE
A01000
A0102B
B01041

I ONLY WANT TO LIST THE FIRST ITEM FOR THE ITEM IN THE SAME GROUPING OF THE FIRST 5 DIGITS.

HOW AM I WRITE A SQL TRANSACT AS ABOVE?


THANKS !


JANE
Reply With Quote