Table name versus table description. Aliases?

  • Thread starter Peter Jay Salzman
  • Start date
P

Peter Jay Salzman

Hi all,

I started using SQL directly, and have realized how inconvenient it is
to name a table descriptively or with spaces in its name.

I'm wondering if there's some kind of alias feature that would allow me
to use descriptive table names in Access's various views, like:

20042 - Spring 2004 Enrollment rerun

but use an abbreviated name like:

20042EnrollRerun

when working directly with SQL.

Thanks!
Pete
 
D

Damien McBain

Peter said:
Hi all,

I started using SQL directly, and have realized how inconvenient it is
to name a table descriptively or with spaces in its name.

I'm wondering if there's some kind of alias feature that would allow
me to use descriptive table names in Access's various views, like:

20042 - Spring 2004 Enrollment rerun

but use an abbreviated name like:

20042EnrollRerun

when working directly with SQL.

Thanks!
Pete

I'd call it "tblSpr04Enr" or something. Long names are difficult and spaces
are pure evil.

Read the 10 commandments: http://www.mvps.org/access/tencommandments.htm

Damo
 
G

Graham R Seach

Peter,

There is, but you still have to code it yourself. Use the *AS* operator when
referring to fields or tables.

SELECT ThisYear.MyFieldWithTheVeryLongName AS myField
FROM [20042 - Spring 2004 Enrollment rerun] AS ThisYear
INNER JOIN [20032 - Spring 2003 Enrollment rerun] AS LastYear
ON LastYear.SomeField = ThisYear.SomeField

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top