Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

er

Status
Not open for further replies.

Steve95

MIS
Nov 3, 2004
265
US
Hi All

Iam new to sql and stored procedures.....

In a sp iam looking at a select statement has 'er' in it, what does do and mean?

eg.

from fin_datawh.dbo.tbl_Report_Exc_Rate er where rate_type_code like 'syse%'
 
er is a table alias here.

For example

select er.*
from fin_datawh.dbo.tbl_Report_Exc_Rate er

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
er is a table alias. It is a shorthand notation that can be used instead of specifying the full table name. In this case it is particularly useful because it specifies a table from another database (fin_datawh).

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
You may be used to seeing alias' with the extra word 'AS' in it, so your example may be more familiar written like this:

Code:
from fin_datawh.dbo.tbl_Report_Exc_Rate [!]as[/!] er where rate_type_code like 'syse%'

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top