[AccessD] Alias Table Name

Mark A Matte markamatte at hotmail.com
Mon Apr 14 10:16:52 CDT 2008


Rocky,

Go to the SQL view...you will be able to see the names.

I use this type of approach when I am 'writing' queries (just typing SQL) that join tables...especially if the tables have some common fields...that way I don't have to type the table name over and over again.

See below...same query...but example 2 takes less space and time to type.

Thanks,

Mark A. MAtte


**********Example1******************
SELECT tblFile_Names.fullMDBCoord, tblTextFound.TextFound, tblFile_Names.Size
FROM tblFile_Names INNER JOIN tblTextFound ON tblFile_Names.fullMDBCoord = tblTextFound.fullMDBCoord;
**********Example1******************


**********Example2******************
SELECT A.fullMDBCoord, B.TextFound, A.Size
FROM tblFile_Names A INNER JOIN tblTextFound  B ON A.fullMDBCoord = B.fullMDBCoord;
**********Example2******************




----------------------------------------
> From: rockysmolin at bchacc.com
> To: accessd at databaseadvisors.com
> Date: Mon, 14 Apr 2008 08:02:00 -0700
> Subject: [AccessD] Alias Table Name
> 
> Dear List:
>  
> In a legacy app I came across some queries which in the QBE had 'alias'ed
> tables (or maybe queries).  one called P was joined to one called A.  The
> list of field names didn't correspond to any table.  There are a lot of
> queries so I didn't look through them to see if a query matched the field
> list in either P or A.
>  
> But I've never seen this done.  Why would you do this?  How can you tell
> what the source of the fields in the aliased table is?  Is there some
> performance gain or other reason for doing this?
> 
> MTIA,
>  
> Rocky
>  
> 
> 
>  	
> 	
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_________________________________________________________________
Going green? See the top 12 foods to eat organic.
http://green.msn.com/galleries/photos/photos.aspx?gid=164&ocid=T003MSN51N1653A



More information about the AccessD mailing list