pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sill-II, Stephen <Stephen.Sill-II@ost.dot.gov>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: referencing column names properly
Date: Sat, 8 Feb 2003 18:34:31 -0500
Message-ID: <4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov> (raw)

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



view thread (5+ messages)  latest in thread

Message-ID: <4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov>
Permalink:  ../4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov/
Also on:    postgresql.org/message-id/4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: Stephen.Sill-II@ost.dot.gov
  Subject: Re: referencing column names properly
  In-Reply-To: <4BAE87828F06EB45B2641B83D370350F45E4@ostex002.ad.ost.dot.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox