X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6DBD3474E5C for ; Sat, 8 Feb 2003 18:34:37 -0500 (EST) Received: from dotmail001.DIR.DOT.GOV (dotmail001.ost.dot.gov [152.119.92.100]) by postgresql.org (Postfix) with SMTP id BC045474E44 for ; Sat, 8 Feb 2003 18:34:36 -0500 (EST) Received: from 152.119.92.39 by dotmail001.DIR.DOT.GOV (InterScan E-Mail VirusWall NT); Sat, 08 Feb 2003 18:34:39 -0500 Received: by ostex001.ad.ost.dot.gov with Internet Mail Service (5.5.2656.59) id ; Sat, 8 Feb 2003 18:31:23 -0500 Message-ID: <4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov> From: "Sill-II, Stephen" To: "'pgsql-sql@postgresql.org'" Subject: referencing column names properly Date: Sat, 8 Feb 2003 18:34:31 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/173 X-Sequence-Number: 11571 I have a table called logs with several columns whose names have '-' in them, e.g. User-Name I'm having trouble referencing these columns with SELECT statements. What would the proper way to address these in a statement like this? SELECT User-Name, max(Date), max(Time) from logs; I want to return the last login date and time for each username. Thanks Stephen Sill II