Education & Training
Services & Support
to create and rate content, and to follow, bookmark, and share content with other members.
Database Table Alias
Question asked by
on Jun 4, 2012
on Jun 12, 2012 by navzjoshi00
Show 0 Likes
Where do I find the aliase names for all of the database tables?
No one else has this question
Mark as assumed answered
This content has been marked as final.
Show 5 comments
(Required, will not be published)
Jun 5, 2012 8:09 AM
Where are you looking at the db table aliases or where are you using them?
Show 1 Like
Jun 5, 2012 1:28 PM
Apparently the alias is set when creating the originating sql. Howevever, it is hard to track if you did not write the sql. The reason I am asking is that I see lots of alias 's being used on the message board posts and I am just trying to follow what is happening in the code. So for something like this:
CASE WHEN RPT_TM_TIMEENTRY.INCIDENT_INVESTMENT_ID IS NOT NULL THEN RPT_TM_INCIDENT_INVESTMENT.CODE ELSE RPT_TM_INVESTMENTS.CODE END,
CASE WHEN RPT_TM_TIMEENTRY.INCIDENT_INVESTMENT_ID IS NOT NULL THEN RPT_TM_INCIDENT_INVESTMENT.NAME ELSE RPT_TM_INVESTMENTS.NAME END,
CASE WHEN RPT_TM_TIMEENTRY.INCIDENT_INVESTMENT_ID IS NOT NULL THEN RPT_TM_INCIDENT_INVESTMENT.DESCRIPTION ELSE RPT_TM_INVESTMENTS.DESCRIPTION END,
SELECT DISTINCT r.id
FROM srm_resources r,
(SELECT v1.object_instance_id id
FROM cmn_sec_chk_user_inst_v v1, srm_resources srmr
WHERE v1.object_instance_id = srmr.id
AND v1.object_type = 'RECORD'
AND v1.object_code = 'PRJ_RESOURCE'
AND v1.permission_code in ('prTimeEntry','prApproveActuals')
AND v1.component_code = 'PRJ'
AND v1.user_id = (select ID from cmn_sec_users where user_name
Where is the 'r' alias being set? is it from this line( FROM srm_resources r,)?
I am not a sql pro, obviously...
Show 0 Likes
Jun 5, 2012 1:37 PM
I think I understand what you are after (non native Engoish and SQL), if I do then
The example you give is the way they are used.
The author of the query can use any alias he or she sees conveniently to serve the purpose.
That is for table names and also for field labels, but for those the purpose is usually to change the somewhat cryptic to more understandable for the end user.
Being like that they vary from query author to query author and even for the same one between queries.
One of the advantages is less typos when they are short.
Show 2 Likes
Jun 11, 2012 5:22 PM
Did Martti's answers help answer your question? If so please mark his post as Accepted Solution.
Show 0 Likes
Jun 12, 2012 6:37 AM
Do you have "
It is easier to track the alias. You can view the code as SQL, and double click on the alias that is being used. Then check for the
clause to see which table does the alias refer to.
Show 8 Likes
Retrieving data ...
Disable Custom Objects and Attributes from the Data Warehouse
Load Data warehouse fails
Is your Load DWH job failing due to too many custom project attributes?
New Upgrade Course for Single Sign-On
Testing PeopleSoft Connection