Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CF73B4762E3 for ; Fri, 18 Oct 2002 12:45:52 -0400 (EDT) Received: from mta5.snet.net (mta5.snet.net [204.60.203.77]) by postgresql.org (Postfix) with ESMTP id 24185475F0D for ; Fri, 18 Oct 2002 12:45:52 -0400 (EDT) Received: from pop.snet.net ([204.60.203.73]) by mta5.snet.net (8.12.3/8.12.3/SNET-mx-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id g9IGgnu9021679 for ; Fri, 18 Oct 2002 12:42:49 -0400 (EDT) X-Originating-IP: [64.252.95.167] X-SBCIS-MTA: [pop.snet.net] Received: from [192.168.1.83] (167.95.252.64.snet.net [64.252.95.167]) by pop.snet.net (8.12.3/8.12.3/SNET-pop-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id g9IGjnpF008496 for ; Fri, 18 Oct 2002 12:45:49 -0400 (EDT) Subject: Is there anyway to do this? From: Wei Weng To: pgsql-sql@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 18 Oct 2002 12:45:56 -0400 Message-Id: <1034959557.27181.3.camel@Monet> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/215 X-Sequence-Number: 9932 I have a table Table "Users" Column | Type | Modifiers -----------+------------------------+----------- userid | character varying(40) | not null username | character varying(64) | I want to get all the distinct first character of all usernames. And do it in a way that is the most portable to MS SQL server. Is there anyway? Thanks -- Wei Weng Network Software Engineer KenCast Inc.